Skip to content

Commit

Permalink
force recreate on master_config.num_instances (GoogleCloudPlatform#7349)
Browse files Browse the repository at this point in the history
  • Loading branch information
c2thorn authored and kubalaguna committed Feb 27, 2023
1 parent 762da90 commit b0e3135
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit b0e3135

Please sign in to comment.