From b3cbcaf0d68d88f521a615a6872168659f9cd903 Mon Sep 17 00:00:00 2001 From: The Magician Date: Fri, 8 Oct 2021 15:51:04 -0700 Subject: [PATCH] fix a crash on gke (#5295) (#10290) Signed-off-by: Modular Magician --- .changelog/5295.txt | 3 +++ google/resource_container_cluster.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 .changelog/5295.txt diff --git a/.changelog/5295.txt b/.changelog/5295.txt new file mode 100644 index 00000000000..c6016a3c986 --- /dev/null +++ b/.changelog/5295.txt @@ -0,0 +1,3 @@ +```release-note:bug +container: fixed a crash on `monitoring_config` of `google_container_cluster` +``` diff --git a/google/resource_container_cluster.go b/google/resource_container_cluster.go index b9d72030b5c..7ce2705e735 100644 --- a/google/resource_container_cluster.go +++ b/google/resource_container_cluster.go @@ -3047,7 +3047,7 @@ func expandMonitoringConfig(configured interface{}) *containerBeta.MonitoringCon config := l[0].(map[string]interface{}) return &containerBeta.MonitoringConfig{ ComponentConfig: &containerBeta.MonitoringComponentConfig{ - EnableComponents: config["enable_components"].([]string), + EnableComponents: convertStringArr(config["enable_components"].([]interface{})), }, } }