@@ -221,6 +221,12 @@ any other patch configuration fields.`,
221
221
},
222
222
AtLeastOneOf : []string {"patch_config.0.reboot_config" , "patch_config.0.apt" , "patch_config.0.yum" , "patch_config.0.goo" , "patch_config.0.zypper" , "patch_config.0.windows_update" , "patch_config.0.pre_step" , "patch_config.0.post_step" },
223
223
},
224
+ "mig_instances_allowed" : {
225
+ Type : schema .TypeBool ,
226
+ Optional : true ,
227
+ ForceNew : true ,
228
+ Description : `Allows the patch job to run on Managed instance groups (MIGs).` ,
229
+ },
224
230
"post_step" : {
225
231
Type : schema .TypeList ,
226
232
Optional : true ,
@@ -1255,6 +1261,8 @@ func flattenOSConfigPatchDeploymentPatchConfig(v interface{}, d *schema.Resource
1255
1261
return nil
1256
1262
}
1257
1263
transformed := make (map [string ]interface {})
1264
+ transformed ["mig_instances_allowed" ] =
1265
+ flattenOSConfigPatchDeploymentPatchConfigMigInstancesAllowed (original ["migInstancesAllowed" ], d , config )
1258
1266
transformed ["reboot_config" ] =
1259
1267
flattenOSConfigPatchDeploymentPatchConfigRebootConfig (original ["rebootConfig" ], d , config )
1260
1268
transformed ["apt" ] =
@@ -1273,6 +1281,10 @@ func flattenOSConfigPatchDeploymentPatchConfig(v interface{}, d *schema.Resource
1273
1281
flattenOSConfigPatchDeploymentPatchConfigPostStep (original ["postStep" ], d , config )
1274
1282
return []interface {}{transformed }
1275
1283
}
1284
+ func flattenOSConfigPatchDeploymentPatchConfigMigInstancesAllowed (v interface {}, d * schema.ResourceData , config * Config ) interface {} {
1285
+ return v
1286
+ }
1287
+
1276
1288
func flattenOSConfigPatchDeploymentPatchConfigRebootConfig (v interface {}, d * schema.ResourceData , config * Config ) interface {} {
1277
1289
return v
1278
1290
}
@@ -2150,6 +2162,13 @@ func expandOSConfigPatchDeploymentPatchConfig(v interface{}, d TerraformResource
2150
2162
original := raw .(map [string ]interface {})
2151
2163
transformed := make (map [string ]interface {})
2152
2164
2165
+ transformedMigInstancesAllowed , err := expandOSConfigPatchDeploymentPatchConfigMigInstancesAllowed (original ["mig_instances_allowed" ], d , config )
2166
+ if err != nil {
2167
+ return nil , err
2168
+ } else if val := reflect .ValueOf (transformedMigInstancesAllowed ); val .IsValid () && ! isEmptyValue (val ) {
2169
+ transformed ["migInstancesAllowed" ] = transformedMigInstancesAllowed
2170
+ }
2171
+
2153
2172
transformedRebootConfig , err := expandOSConfigPatchDeploymentPatchConfigRebootConfig (original ["reboot_config" ], d , config )
2154
2173
if err != nil {
2155
2174
return nil , err
@@ -2209,6 +2228,10 @@ func expandOSConfigPatchDeploymentPatchConfig(v interface{}, d TerraformResource
2209
2228
return transformed , nil
2210
2229
}
2211
2230
2231
+ func expandOSConfigPatchDeploymentPatchConfigMigInstancesAllowed (v interface {}, d TerraformResourceData , config * Config ) (interface {}, error ) {
2232
+ return v , nil
2233
+ }
2234
+
2212
2235
func expandOSConfigPatchDeploymentPatchConfigRebootConfig (v interface {}, d TerraformResourceData , config * Config ) (interface {}, error ) {
2213
2236
return v , nil
2214
2237
}
0 commit comments