From 8473c6cc762eb2e00fb9dfae6f95c73946bbfac6 Mon Sep 17 00:00:00 2001 From: megan07 Date: Tue, 29 Oct 2019 11:00:10 -0500 Subject: [PATCH] remove kubernetes_dashboard from google_container_cluster (#2551) --- .../resource_container_cluster.go.erb | 21 ++----------------- .../resource_container_cluster_test.go.erb | 2 -- .../guides/version_3_upgrade.html.markdown | 6 ++++++ .../docs/r/container_cluster.html.markdown | 4 ---- 4 files changed, 8 insertions(+), 25 deletions(-) diff --git a/third_party/terraform/resources/resource_container_cluster.go.erb b/third_party/terraform/resources/resource_container_cluster.go.erb index 597d456658cc..82966308e3ad 100644 --- a/third_party/terraform/resources/resource_container_cluster.go.erb +++ b/third_party/terraform/resources/resource_container_cluster.go.erb @@ -196,16 +196,14 @@ func resourceContainerCluster() *schema.Resource { }, "kubernetes_dashboard": { Type: schema.TypeList, - Optional: true, - Computed: true, - Deprecated: "The Kubernetes Dashboard addon is deprecated for clusters on GKE.", + Optional: true, + Removed: "The Kubernetes Dashboard addon is removed for clusters on GKE.", MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "disabled": { Type: schema.TypeBool, Optional: true, - Default: true, }, }, }, @@ -2135,14 +2133,6 @@ func expandClusterAddonsConfig(configured interface{}) *containerBeta.AddonsConf } } - if v, ok := config["kubernetes_dashboard"]; ok && len(v.([]interface{})) > 0 { - addon := v.([]interface{})[0].(map[string]interface{}) - ac.KubernetesDashboard = &containerBeta.KubernetesDashboard{ - Disabled: addon["disabled"].(bool), - ForceSendFields: []string{"Disabled"}, - } - } - if v, ok := config["network_policy_config"]; ok && len(v.([]interface{})) > 0 { addon := v.([]interface{})[0].(map[string]interface{}) ac.NetworkPolicyConfig = &containerBeta.NetworkPolicyConfig{ @@ -2543,13 +2533,6 @@ func flattenClusterAddonsConfig(c *containerBeta.AddonsConfig) []map[string]inte }, } } - if c.KubernetesDashboard != nil { - result["kubernetes_dashboard"] = []map[string]interface{}{ - { - "disabled": c.KubernetesDashboard.Disabled, - }, - } - } if c.NetworkPolicyConfig != nil { result["network_policy_config"] = []map[string]interface{}{ { diff --git a/third_party/terraform/tests/resource_container_cluster_test.go.erb b/third_party/terraform/tests/resource_container_cluster_test.go.erb index 680ecd96d196..6f687336a9f9 100644 --- a/third_party/terraform/tests/resource_container_cluster_test.go.erb +++ b/third_party/terraform/tests/resource_container_cluster_test.go.erb @@ -1906,7 +1906,6 @@ resource "google_container_cluster" "primary" { addons_config { http_load_balancing { disabled = true } horizontal_pod_autoscaling { disabled = true } - kubernetes_dashboard { disabled = true } network_policy_config { disabled = true } <% unless version == 'ga' -%> istio_config { @@ -1928,7 +1927,6 @@ resource "google_container_cluster" "primary" { addons_config { http_load_balancing { disabled = false } - kubernetes_dashboard { disabled = false } horizontal_pod_autoscaling { disabled = false } network_policy_config { disabled = false } <% unless version == 'ga' -%> diff --git a/third_party/terraform/website/docs/guides/version_3_upgrade.html.markdown b/third_party/terraform/website/docs/guides/version_3_upgrade.html.markdown index 8f98ced2cf05..cec9c61717f8 100644 --- a/third_party/terraform/website/docs/guides/version_3_upgrade.html.markdown +++ b/third_party/terraform/website/docs/guides/version_3_upgrade.html.markdown @@ -354,6 +354,12 @@ Before updating, remove it from your config. ## Resource: `google_container_cluster` +### `addons_config.kubernetes_dashboard` is now removed + +The `kubernetes_dashboard` addon is deprecated for clusters on GKE and +will soon be removed. It is recommended to use alternative GCP Console +dashboards. + ### `zone`, `region` and `additional_zones` are now removed `zone` and `region` have been removed in favor of `location` and diff --git a/third_party/terraform/website/docs/r/container_cluster.html.markdown b/third_party/terraform/website/docs/r/container_cluster.html.markdown index a2ddfbf2b361..6f1132536858 100644 --- a/third_party/terraform/website/docs/r/container_cluster.html.markdown +++ b/third_party/terraform/website/docs/r/container_cluster.html.markdown @@ -313,10 +313,6 @@ The `addons_config` block supports: controller addon, which makes it easy to set up HTTP load balancers for services in a cluster. It is enabled by default; set `disabled = true` to disable. -* `kubernetes_dashboard` - (Optional, Deprecated) The status of the Kubernetes Dashboard - add-on, which controls whether the Kubernetes Dashboard is enabled for this cluster. - It is disabled by default; set `disabled = false` to enable. - * `network_policy_config` - (Optional) Whether we should enable the network policy addon for the master. This must be enabled in order to enable network policy for the nodes. To enable this, you must also define a [`network_policy`](#network_policy) block,