Skip to content

Commit cc2ea53

Browse files
fix: permadiff issue when docker_repository field is not specified (#9850) (#17072)
relates to GoogleCloudPlatform/cloud-foundation-fabric#1987 When docker repository is not specified by default docker repository`projects/PROJECT_ID/locations/REGION/repositories/gcf-artifacts` is used.In such a case, terraform plan always generates a difference for `docker_repository`field as the module passes null value but the tfstate file has the above specifieddefault value. This fix allows one to prevent unnecessary infrastructure change. [upstream:3540e663502c1286967dd61650bb8ee7c2b35cf9] Signed-off-by: Modular Magician <[email protected]>
1 parent 01dd53b commit cc2ea53

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

.changelog/9850.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:bug
2+
Fixed an issue when `docker_repository` is not specified in build_config section of the `google_cloudfunctions2_function`, the provider should not generate a diff during plan for the default value used by the API.
3+
```

google/services/cloudfunctions2/resource_cloudfunctions2_function.go

+1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ from the given source.`,
7878
Schema: map[string]*schema.Schema{
7979
"docker_repository": {
8080
Type: schema.TypeString,
81+
Computed: true,
8182
Optional: true,
8283
Description: `User managed repository created in Artifact Registry optionally with a customer managed encryption key.`,
8384
},

0 commit comments

Comments
 (0)