From b0e3135120c6233dc56ddd0cea183cce62e5ccb8 Mon Sep 17 00:00:00 2001 From: Cameron Thornton Date: Fri, 24 Feb 2023 14:59:50 -0600 Subject: [PATCH] force recreate on master_config.num_instances (#7349) --- .../terraform/resources/resource_dataproc_cluster.go.erb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mmv1/third_party/terraform/resources/resource_dataproc_cluster.go.erb b/mmv1/third_party/terraform/resources/resource_dataproc_cluster.go.erb index 2c7a557d6560..4841504883e6 100644 --- a/mmv1/third_party/terraform/resources/resource_dataproc_cluster.go.erb +++ b/mmv1/third_party/terraform/resources/resource_dataproc_cluster.go.erb @@ -1155,6 +1155,8 @@ func instanceConfigSchema(parent string) *schema.Schema { "cluster_config.0." + parent + ".0.accelerators", } + masterConfig := strings.Contains(parent, "master") + return &schema.Schema{ Type: schema.TypeList, Optional: true, @@ -1167,6 +1169,7 @@ func instanceConfigSchema(parent string) *schema.Schema { "num_instances": { Type: schema.TypeInt, Optional: true, + ForceNew: masterConfig, Computed: true, Description: `Specifies the number of master/worker nodes to create. If not specified, GCP will default to a predetermined computed value.`, AtLeastOneOf: instanceConfigKeys,