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{})), }, } }