From 9ae31702a49e712b98ccd14aca810b8de153bf08 Mon Sep 17 00:00:00 2001 From: Modular Magician Date: Thu, 21 Sep 2023 17:03:08 +0000 Subject: [PATCH] Change container node pool defaults (#8967) Signed-off-by: Modular Magician --- .changelog/8967.txt | 6 ++++++ google/services/container/node_config.go | 2 +- google/services/container/resource_container_node_pool.go | 8 ++++---- .../container/resource_container_node_pool_test.go | 1 + website/docs/r/container_node_pool.html.markdown | 4 ++-- 5 files changed, 14 insertions(+), 7 deletions(-) create mode 100644 .changelog/8967.txt diff --git a/.changelog/8967.txt b/.changelog/8967.txt new file mode 100644 index 00000000000..52b9cf9d95d --- /dev/null +++ b/.changelog/8967.txt @@ -0,0 +1,6 @@ +```release-note:breaking-change +container: removed default for `logging_variant` in `google_container_node_pool` +``` +```release-note:breaking-change +container: changed `management.auto_repair` and `management.auto_upgrade` defaults to true in `google_container_node_pool` +``` diff --git a/google/services/container/node_config.go b/google/services/container/node_config.go index c9d584fa2ae..3def1aa6f69 100644 --- a/google/services/container/node_config.go +++ b/google/services/container/node_config.go @@ -25,8 +25,8 @@ func schemaLoggingVariant() *schema.Schema { return &schema.Schema{ Type: schema.TypeString, Optional: true, + Computed: true, Description: `Type of logging agent that is used as the default value for node pools in the cluster. Valid values include DEFAULT and MAX_THROUGHPUT.`, - Default: "DEFAULT", ValidateFunc: validation.StringInSlice([]string{"DEFAULT", "MAX_THROUGHPUT"}, false), } } diff --git a/google/services/container/resource_container_node_pool.go b/google/services/container/resource_container_node_pool.go index b05867cfd96..16dd6b30090 100644 --- a/google/services/container/resource_container_node_pool.go +++ b/google/services/container/resource_container_node_pool.go @@ -290,15 +290,15 @@ var schemaNodePool = map[string]*schema.Schema{ "auto_repair": { Type: schema.TypeBool, Optional: true, - Default: false, - Description: `Whether the nodes will be automatically repaired.`, + Default: true, + Description: `Whether the nodes will be automatically repaired. Enabled by default.`, }, "auto_upgrade": { Type: schema.TypeBool, Optional: true, - Default: false, - Description: `Whether the nodes will be automatically upgraded.`, + Default: true, + Description: `Whether the nodes will be automatically upgraded. Enabled by default.`, }, }, }, diff --git a/google/services/container/resource_container_node_pool_test.go b/google/services/container/resource_container_node_pool_test.go index e8a494ca5a4..91ac16acfb0 100644 --- a/google/services/container/resource_container_node_pool_test.go +++ b/google/services/container/resource_container_node_pool_test.go @@ -2348,6 +2348,7 @@ resource "google_container_node_pool" "with_kubelet_config" { "https://www.googleapis.com/auth/logging.write", "https://www.googleapis.com/auth/monitoring", ] + logging_variant = "DEFAULT" } } `, cluster, np, policy, quota, period, podPidsLimit) diff --git a/website/docs/r/container_node_pool.html.markdown b/website/docs/r/container_node_pool.html.markdown index 523d2684a41..bbf814662a8 100644 --- a/website/docs/r/container_node_pool.html.markdown +++ b/website/docs/r/container_node_pool.html.markdown @@ -201,9 +201,9 @@ cluster. The `management` block supports: -* `auto_repair` - (Optional) Whether the nodes will be automatically repaired. +* `auto_repair` - (Optional) Whether the nodes will be automatically repaired. Enabled by default. -* `auto_upgrade` - (Optional) Whether the nodes will be automatically upgraded. +* `auto_upgrade` - (Optional) Whether the nodes will be automatically upgraded. Enabled by default. The `network_config` block supports: