Skip to content

Commit

Permalink
fix: permadiff issue when docker_repository field is not specified …
Browse files Browse the repository at this point in the history
…(#9850) (#6887)

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 <magic-modules@google.com>
  • Loading branch information
modular-magician committed Jan 22, 2024
1 parent d34625e commit b5182cb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/9850.txt
@@ -0,0 +1,3 @@
```release-note:bug
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.
```
Expand Up @@ -78,6 +78,7 @@ from the given source.`,
Schema: map[string]*schema.Schema{
"docker_repository": {
Type: schema.TypeString,
Computed: true,
Optional: true,
Description: `User managed repository created in Artifact Registry optionally with a customer managed encryption key.`,
},
Expand Down

0 comments on commit b5182cb

Please sign in to comment.