Merge pull request #1555 from GoogleCloudPlatform/jccb/toc

Fix permadiff in artifact-registry
This commit is contained in:
Julio Castillo 2023-07-31 18:20:28 +02:00 committed by GitHub
commit bae985513f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -30,7 +30,12 @@ resource "google_artifact_registry_repository" "registry" {
kms_key_name = var.encryption_key
dynamic "docker_config" {
for_each = local.format_string == "docker" ? [""] : []
# TODO: open a bug on the provider for this permadiff
for_each = (
local.format_string == "docker" && try(var.format.docker.immutable_tags, null) == true
? [""]
: []
)
content {
immutable_tags = var.format.docker.immutable_tags
}