diff --git a/mmv1/third_party/terraform/resources/resource_container_node_pool.go.erb b/mmv1/third_party/terraform/resources/resource_container_node_pool.go.erb index 59807a7f0701..f36748a974f2 100644 --- a/mmv1/third_party/terraform/resources/resource_container_node_pool.go.erb +++ b/mmv1/third_party/terraform/resources/resource_container_node_pool.go.erb @@ -1665,13 +1665,14 @@ func nodePoolUpdate(d *schema.ResourceData, meta interface{}, nodePoolInfo *Node if v, ok := blueGreenSettingsConfig["standard_rollout_policy"]; ok && len(v.([]interface{})) > 0 { standardRolloutPolicy := &container.StandardRolloutPolicy{} - standardRolloutPolicyConfig := v.([]interface{})[0].(map[string]interface{}) - standardRolloutPolicy.BatchSoakDuration = standardRolloutPolicyConfig["batch_soak_duration"].(string) - if v, ok := standardRolloutPolicyConfig["batch_node_count"]; ok { - standardRolloutPolicy.BatchNodeCount = int64(v.(int)) - } - if v, ok := standardRolloutPolicyConfig["batch_percentage"]; ok { - standardRolloutPolicy.BatchPercentage = v.(float64) + if standardRolloutPolicyConfig, ok := v.([]interface{})[0].(map[string]interface{}); ok { + standardRolloutPolicy.BatchSoakDuration = standardRolloutPolicyConfig["batch_soak_duration"].(string) + if v, ok := standardRolloutPolicyConfig["batch_node_count"]; ok { + standardRolloutPolicy.BatchNodeCount = int64(v.(int)) + } + if v, ok := standardRolloutPolicyConfig["batch_percentage"]; ok { + standardRolloutPolicy.BatchPercentage = v.(float64) + } } blueGreenSettings.StandardRolloutPolicy = standardRolloutPolicy }