diff --git a/modules/create_environment_v2/main.tf b/modules/create_environment_v2/main.tf index 45b0155..0776115 100644 --- a/modules/create_environment_v2/main.tf +++ b/modules/create_environment_v2/main.tf @@ -200,12 +200,9 @@ resource "google_composer_environment" "composer_env" { } dynamic "encryption_config" { - for_each = var.kms_key_name != null ? [ - { - kms_key_name = var.kms_key_name - }] : [] + for_each = var.kms_key_name != null ? ["encryption_config"] : [] content { - kms_key_name = encryption_config.value["kms_key_name"] + kms_key_name = var.kms_key_name } }