File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,18 @@ func resourceCluster() *schema.Resource {
74
74
oldRoleARN := aws .ToString (oldComputeConfig .NodeRoleArn )
75
75
newRoleARN := aws .ToString (newComputeConfig .NodeRoleArn )
76
76
77
+ newComputeConfigEnabled := aws .ToBool (newComputeConfig .Enabled )
78
+
79
+ // Do not force new if auto mode is disabled in new config and role ARN is unset
80
+ if ! newComputeConfigEnabled && newRoleARN == "" {
81
+ return nil
82
+ }
83
+
84
+ // Do not force new if built-in node pools are zeroed in new config and role ARN is unset
85
+ if len (newComputeConfig .NodePools ) == 0 && newRoleARN == "" {
86
+ return nil
87
+ }
88
+
77
89
// only force new if an existing role has changed, not if a new role is added
78
90
if oldRoleARN != "" && oldRoleARN != newRoleARN {
79
91
if err := rd .ForceNew ("compute_config.0.node_role_arn" ); err != nil {
You can’t perform that action at this time.
0 commit comments