diff --git a/modules/gke-autopilot-cluster/main.tf b/modules/gke-autopilot-cluster/main.tf index 355bbdaaa4..2bf81b05bf 100644 --- a/modules/gke-autopilot-cluster/main.tf +++ b/modules/gke-autopilot-cluster/main.tf @@ -64,7 +64,7 @@ resource "google_container_cluster" "main" { dynamic "cost_management_config" { for_each = var.cost_management_config != null ? [var.cost_management_config] : [] content { - enabled = cost_management_config.enabled + enabled = cost_management_config.value.enabled } } diff --git a/modules/gke-standard-cluster/main.tf b/modules/gke-standard-cluster/main.tf index 9520101d5d..30905debf7 100644 --- a/modules/gke-standard-cluster/main.tf +++ b/modules/gke-standard-cluster/main.tf @@ -1121,7 +1121,7 @@ resource "google_container_cluster" "main" { dynamic "cost_management_config" { for_each = var.cost_management_config != null ? [var.cost_management_config] : [] content { - enabled = cost_management_config.enabled + enabled = cost_management_config.value.enabled } }