diff --git a/autogen/main/cluster.tf.tmpl b/autogen/main/cluster.tf.tmpl index 69d3c8ad7..e0a6e0d02 100644 --- a/autogen/main/cluster.tf.tmpl +++ b/autogen/main/cluster.tf.tmpl @@ -90,7 +90,7 @@ resource "google_container_cluster" "primary" { autoscaling_profile = var.cluster_autoscaling.autoscaling_profile != null ? var.cluster_autoscaling.autoscaling_profile : "BALANCED" {% endif %} dynamic "resource_limits" { - for_each = local.autoscalling_resource_limits + for_each = local.autoscaling_resource_limits content { resource_type = lookup(resource_limits.value, "resource_type") minimum = lookup(resource_limits.value, "minimum") diff --git a/autogen/main/main.tf.tmpl b/autogen/main/main.tf.tmpl index 57f0c851f..e219e9139 100644 --- a/autogen/main/main.tf.tmpl +++ b/autogen/main/main.tf.tmpl @@ -55,7 +55,7 @@ locals { release_channel = var.release_channel != null ? [{ channel : var.release_channel }] : [] - autoscalling_resource_limits = var.cluster_autoscaling.enabled ? [{ + autoscaling_resource_limits = var.cluster_autoscaling.enabled ? [{ resource_type = "cpu" minimum = var.cluster_autoscaling.min_cpu_cores maximum = var.cluster_autoscaling.max_cpu_cores diff --git a/cluster.tf b/cluster.tf index e1891d424..03e4154cf 100644 --- a/cluster.tf +++ b/cluster.tf @@ -59,7 +59,7 @@ resource "google_container_cluster" "primary" { cluster_autoscaling { enabled = var.cluster_autoscaling.enabled dynamic "resource_limits" { - for_each = local.autoscalling_resource_limits + for_each = local.autoscaling_resource_limits content { resource_type = lookup(resource_limits.value, "resource_type") minimum = lookup(resource_limits.value, "minimum") diff --git a/main.tf b/main.tf index 0ca482955..c56671950 100644 --- a/main.tf +++ b/main.tf @@ -51,7 +51,7 @@ locals { release_channel = var.release_channel != null ? [{ channel : var.release_channel }] : [] - autoscalling_resource_limits = var.cluster_autoscaling.enabled ? [{ + autoscaling_resource_limits = var.cluster_autoscaling.enabled ? [{ resource_type = "cpu" minimum = var.cluster_autoscaling.min_cpu_cores maximum = var.cluster_autoscaling.max_cpu_cores diff --git a/modules/beta-private-cluster-update-variant/cluster.tf b/modules/beta-private-cluster-update-variant/cluster.tf index 31de261c6..c13c056d6 100644 --- a/modules/beta-private-cluster-update-variant/cluster.tf +++ b/modules/beta-private-cluster-update-variant/cluster.tf @@ -77,7 +77,7 @@ resource "google_container_cluster" "primary" { } autoscaling_profile = var.cluster_autoscaling.autoscaling_profile != null ? var.cluster_autoscaling.autoscaling_profile : "BALANCED" dynamic "resource_limits" { - for_each = local.autoscalling_resource_limits + for_each = local.autoscaling_resource_limits content { resource_type = lookup(resource_limits.value, "resource_type") minimum = lookup(resource_limits.value, "minimum") diff --git a/modules/beta-private-cluster-update-variant/main.tf b/modules/beta-private-cluster-update-variant/main.tf index cf6a0a49d..0219f1da8 100644 --- a/modules/beta-private-cluster-update-variant/main.tf +++ b/modules/beta-private-cluster-update-variant/main.tf @@ -51,7 +51,7 @@ locals { release_channel = var.release_channel != null ? [{ channel : var.release_channel }] : [] - autoscalling_resource_limits = var.cluster_autoscaling.enabled ? [{ + autoscaling_resource_limits = var.cluster_autoscaling.enabled ? [{ resource_type = "cpu" minimum = var.cluster_autoscaling.min_cpu_cores maximum = var.cluster_autoscaling.max_cpu_cores diff --git a/modules/beta-private-cluster/cluster.tf b/modules/beta-private-cluster/cluster.tf index b05a12585..fd853a055 100644 --- a/modules/beta-private-cluster/cluster.tf +++ b/modules/beta-private-cluster/cluster.tf @@ -77,7 +77,7 @@ resource "google_container_cluster" "primary" { } autoscaling_profile = var.cluster_autoscaling.autoscaling_profile != null ? var.cluster_autoscaling.autoscaling_profile : "BALANCED" dynamic "resource_limits" { - for_each = local.autoscalling_resource_limits + for_each = local.autoscaling_resource_limits content { resource_type = lookup(resource_limits.value, "resource_type") minimum = lookup(resource_limits.value, "minimum") diff --git a/modules/beta-private-cluster/main.tf b/modules/beta-private-cluster/main.tf index cf6a0a49d..0219f1da8 100644 --- a/modules/beta-private-cluster/main.tf +++ b/modules/beta-private-cluster/main.tf @@ -51,7 +51,7 @@ locals { release_channel = var.release_channel != null ? [{ channel : var.release_channel }] : [] - autoscalling_resource_limits = var.cluster_autoscaling.enabled ? [{ + autoscaling_resource_limits = var.cluster_autoscaling.enabled ? [{ resource_type = "cpu" minimum = var.cluster_autoscaling.min_cpu_cores maximum = var.cluster_autoscaling.max_cpu_cores diff --git a/modules/beta-public-cluster-update-variant/cluster.tf b/modules/beta-public-cluster-update-variant/cluster.tf index 47976d4e4..551701a23 100644 --- a/modules/beta-public-cluster-update-variant/cluster.tf +++ b/modules/beta-public-cluster-update-variant/cluster.tf @@ -77,7 +77,7 @@ resource "google_container_cluster" "primary" { } autoscaling_profile = var.cluster_autoscaling.autoscaling_profile != null ? var.cluster_autoscaling.autoscaling_profile : "BALANCED" dynamic "resource_limits" { - for_each = local.autoscalling_resource_limits + for_each = local.autoscaling_resource_limits content { resource_type = lookup(resource_limits.value, "resource_type") minimum = lookup(resource_limits.value, "minimum") diff --git a/modules/beta-public-cluster-update-variant/main.tf b/modules/beta-public-cluster-update-variant/main.tf index 16b51545f..9d72a0284 100644 --- a/modules/beta-public-cluster-update-variant/main.tf +++ b/modules/beta-public-cluster-update-variant/main.tf @@ -51,7 +51,7 @@ locals { release_channel = var.release_channel != null ? [{ channel : var.release_channel }] : [] - autoscalling_resource_limits = var.cluster_autoscaling.enabled ? [{ + autoscaling_resource_limits = var.cluster_autoscaling.enabled ? [{ resource_type = "cpu" minimum = var.cluster_autoscaling.min_cpu_cores maximum = var.cluster_autoscaling.max_cpu_cores diff --git a/modules/beta-public-cluster/cluster.tf b/modules/beta-public-cluster/cluster.tf index 923f48087..3894ce75a 100644 --- a/modules/beta-public-cluster/cluster.tf +++ b/modules/beta-public-cluster/cluster.tf @@ -77,7 +77,7 @@ resource "google_container_cluster" "primary" { } autoscaling_profile = var.cluster_autoscaling.autoscaling_profile != null ? var.cluster_autoscaling.autoscaling_profile : "BALANCED" dynamic "resource_limits" { - for_each = local.autoscalling_resource_limits + for_each = local.autoscaling_resource_limits content { resource_type = lookup(resource_limits.value, "resource_type") minimum = lookup(resource_limits.value, "minimum") diff --git a/modules/beta-public-cluster/main.tf b/modules/beta-public-cluster/main.tf index 16b51545f..9d72a0284 100644 --- a/modules/beta-public-cluster/main.tf +++ b/modules/beta-public-cluster/main.tf @@ -51,7 +51,7 @@ locals { release_channel = var.release_channel != null ? [{ channel : var.release_channel }] : [] - autoscalling_resource_limits = var.cluster_autoscaling.enabled ? [{ + autoscaling_resource_limits = var.cluster_autoscaling.enabled ? [{ resource_type = "cpu" minimum = var.cluster_autoscaling.min_cpu_cores maximum = var.cluster_autoscaling.max_cpu_cores diff --git a/modules/private-cluster-update-variant/cluster.tf b/modules/private-cluster-update-variant/cluster.tf index fab61a072..a508ec629 100644 --- a/modules/private-cluster-update-variant/cluster.tf +++ b/modules/private-cluster-update-variant/cluster.tf @@ -59,7 +59,7 @@ resource "google_container_cluster" "primary" { cluster_autoscaling { enabled = var.cluster_autoscaling.enabled dynamic "resource_limits" { - for_each = local.autoscalling_resource_limits + for_each = local.autoscaling_resource_limits content { resource_type = lookup(resource_limits.value, "resource_type") minimum = lookup(resource_limits.value, "minimum") diff --git a/modules/private-cluster-update-variant/main.tf b/modules/private-cluster-update-variant/main.tf index e03b883f9..a31a7ee70 100644 --- a/modules/private-cluster-update-variant/main.tf +++ b/modules/private-cluster-update-variant/main.tf @@ -51,7 +51,7 @@ locals { release_channel = var.release_channel != null ? [{ channel : var.release_channel }] : [] - autoscalling_resource_limits = var.cluster_autoscaling.enabled ? [{ + autoscaling_resource_limits = var.cluster_autoscaling.enabled ? [{ resource_type = "cpu" minimum = var.cluster_autoscaling.min_cpu_cores maximum = var.cluster_autoscaling.max_cpu_cores diff --git a/modules/private-cluster/cluster.tf b/modules/private-cluster/cluster.tf index 37bc5c18c..fe3453371 100644 --- a/modules/private-cluster/cluster.tf +++ b/modules/private-cluster/cluster.tf @@ -59,7 +59,7 @@ resource "google_container_cluster" "primary" { cluster_autoscaling { enabled = var.cluster_autoscaling.enabled dynamic "resource_limits" { - for_each = local.autoscalling_resource_limits + for_each = local.autoscaling_resource_limits content { resource_type = lookup(resource_limits.value, "resource_type") minimum = lookup(resource_limits.value, "minimum") diff --git a/modules/private-cluster/main.tf b/modules/private-cluster/main.tf index e03b883f9..a31a7ee70 100644 --- a/modules/private-cluster/main.tf +++ b/modules/private-cluster/main.tf @@ -51,7 +51,7 @@ locals { release_channel = var.release_channel != null ? [{ channel : var.release_channel }] : [] - autoscalling_resource_limits = var.cluster_autoscaling.enabled ? [{ + autoscaling_resource_limits = var.cluster_autoscaling.enabled ? [{ resource_type = "cpu" minimum = var.cluster_autoscaling.min_cpu_cores maximum = var.cluster_autoscaling.max_cpu_cores