diff --git a/modules/artifact-registry/main.tf b/modules/artifact-registry/main.tf index 1a1476bfd9..5b23a193d0 100644 --- a/modules/artifact-registry/main.tf +++ b/modules/artifact-registry/main.tf @@ -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 }