Skip to content
Permalink
Browse files
feat: Make auto_provisioning_defaults a non-beta feature and set `min…
…_cpu_platform` for auto-provisioned node pools (#1077)
  • Loading branch information
stanley98yu committed Nov 30, 2021
1 parent d062c5b commit 5603718d81920c141103993abbc72e2080aa2701
@@ -86,15 +86,18 @@ resource "google_container_cluster" "primary" {

cluster_autoscaling {
enabled = var.cluster_autoscaling.enabled
{% if beta_cluster %}
dynamic "auto_provisioning_defaults" {
for_each = var.cluster_autoscaling.enabled ? [1] : []

content {
service_account = local.service_account
oauth_scopes = local.node_pools_oauth_scopes["all"]
{% if beta_cluster %}
min_cpu_platform = lookup(var.node_pools[0], "min_cpu_platform", "")
{% endif %}
}
}
{% if beta_cluster %}
autoscaling_profile = var.cluster_autoscaling.autoscaling_profile != null ? var.cluster_autoscaling.autoscaling_profile : "BALANCED"
{% endif %}
dynamic "resource_limits" {
@@ -58,6 +58,14 @@ resource "google_container_cluster" "primary" {

cluster_autoscaling {
enabled = var.cluster_autoscaling.enabled
dynamic "auto_provisioning_defaults" {
for_each = var.cluster_autoscaling.enabled ? [1] : []

content {
service_account = local.service_account
oauth_scopes = local.node_pools_oauth_scopes["all"]
}
}
dynamic "resource_limits" {
for_each = local.autoscaling_resource_limits
content {
@@ -77,8 +77,9 @@ resource "google_container_cluster" "primary" {
for_each = var.cluster_autoscaling.enabled ? [1] : []

content {
service_account = local.service_account
oauth_scopes = local.node_pools_oauth_scopes["all"]
service_account = local.service_account
oauth_scopes = local.node_pools_oauth_scopes["all"]
min_cpu_platform = lookup(var.node_pools[0], "min_cpu_platform", "")
}
}
autoscaling_profile = var.cluster_autoscaling.autoscaling_profile != null ? var.cluster_autoscaling.autoscaling_profile : "BALANCED"
@@ -77,8 +77,9 @@ resource "google_container_cluster" "primary" {
for_each = var.cluster_autoscaling.enabled ? [1] : []

content {
service_account = local.service_account
oauth_scopes = local.node_pools_oauth_scopes["all"]
service_account = local.service_account
oauth_scopes = local.node_pools_oauth_scopes["all"]
min_cpu_platform = lookup(var.node_pools[0], "min_cpu_platform", "")
}
}
autoscaling_profile = var.cluster_autoscaling.autoscaling_profile != null ? var.cluster_autoscaling.autoscaling_profile : "BALANCED"
@@ -77,8 +77,9 @@ resource "google_container_cluster" "primary" {
for_each = var.cluster_autoscaling.enabled ? [1] : []

content {
service_account = local.service_account
oauth_scopes = local.node_pools_oauth_scopes["all"]
service_account = local.service_account
oauth_scopes = local.node_pools_oauth_scopes["all"]
min_cpu_platform = lookup(var.node_pools[0], "min_cpu_platform", "")
}
}
autoscaling_profile = var.cluster_autoscaling.autoscaling_profile != null ? var.cluster_autoscaling.autoscaling_profile : "BALANCED"
@@ -77,8 +77,9 @@ resource "google_container_cluster" "primary" {
for_each = var.cluster_autoscaling.enabled ? [1] : []

content {
service_account = local.service_account
oauth_scopes = local.node_pools_oauth_scopes["all"]
service_account = local.service_account
oauth_scopes = local.node_pools_oauth_scopes["all"]
min_cpu_platform = lookup(var.node_pools[0], "min_cpu_platform", "")
}
}
autoscaling_profile = var.cluster_autoscaling.autoscaling_profile != null ? var.cluster_autoscaling.autoscaling_profile : "BALANCED"
@@ -58,6 +58,14 @@ resource "google_container_cluster" "primary" {

cluster_autoscaling {
enabled = var.cluster_autoscaling.enabled
dynamic "auto_provisioning_defaults" {
for_each = var.cluster_autoscaling.enabled ? [1] : []

content {
service_account = local.service_account
oauth_scopes = local.node_pools_oauth_scopes["all"]
}
}
dynamic "resource_limits" {
for_each = local.autoscaling_resource_limits
content {
@@ -58,6 +58,14 @@ resource "google_container_cluster" "primary" {

cluster_autoscaling {
enabled = var.cluster_autoscaling.enabled
dynamic "auto_provisioning_defaults" {
for_each = var.cluster_autoscaling.enabled ? [1] : []

content {
service_account = local.service_account
oauth_scopes = local.node_pools_oauth_scopes["all"]
}
}
dynamic "resource_limits" {
for_each = local.autoscaling_resource_limits
content {

0 comments on commit 5603718

Please sign in to comment.