@@ -201,6 +201,12 @@ The elements are of the form "KEY=VALUE" for the environment variable
201
201
Optional : true ,
202
202
Description : `Unique identifier for this build step, used in 'wait_for' to
203
203
reference this build step as a dependency.` ,
204
+ },
205
+ "script" : {
206
+ Type : schema .TypeString ,
207
+ Optional : true ,
208
+ Description : `A shell script to be executed in the step.
209
+ When script is provided, the user cannot specify the entrypoint or args.` ,
204
210
},
205
211
"secret_env" : {
206
212
Type : schema .TypeList ,
@@ -2172,6 +2178,7 @@ func flattenCloudBuildTriggerBuildStep(v interface{}, d *schema.ResourceData, co
2172
2178
"timing" : flattenCloudBuildTriggerBuildStepTiming (original ["timing" ], d , config ),
2173
2179
"volumes" : flattenCloudBuildTriggerBuildStepVolumes (original ["volumes" ], d , config ),
2174
2180
"wait_for" : flattenCloudBuildTriggerBuildStepWaitFor (original ["waitFor" ], d , config ),
2181
+ "script" : flattenCloudBuildTriggerBuildStepScript (original ["script" ], d , config ),
2175
2182
})
2176
2183
}
2177
2184
return transformed
@@ -2243,6 +2250,10 @@ func flattenCloudBuildTriggerBuildStepWaitFor(v interface{}, d *schema.ResourceD
2243
2250
return v
2244
2251
}
2245
2252
2253
+ func flattenCloudBuildTriggerBuildStepScript (v interface {}, d * schema.ResourceData , config * Config ) interface {} {
2254
+ return v
2255
+ }
2256
+
2246
2257
func flattenCloudBuildTriggerBuildArtifacts (v interface {}, d * schema.ResourceData , config * Config ) interface {} {
2247
2258
if v == nil {
2248
2259
return nil
@@ -3413,6 +3424,13 @@ func expandCloudBuildTriggerBuildStep(v interface{}, d TerraformResourceData, co
3413
3424
transformed ["waitFor" ] = transformedWaitFor
3414
3425
}
3415
3426
3427
+ transformedScript , err := expandCloudBuildTriggerBuildStepScript (original ["script" ], d , config )
3428
+ if err != nil {
3429
+ return nil , err
3430
+ } else if val := reflect .ValueOf (transformedScript ); val .IsValid () && ! isEmptyValue (val ) {
3431
+ transformed ["script" ] = transformedScript
3432
+ }
3433
+
3416
3434
req = append (req , transformed )
3417
3435
}
3418
3436
return req , nil
@@ -3495,6 +3513,10 @@ func expandCloudBuildTriggerBuildStepWaitFor(v interface{}, d TerraformResourceD
3495
3513
return v , nil
3496
3514
}
3497
3515
3516
+ func expandCloudBuildTriggerBuildStepScript (v interface {}, d TerraformResourceData , config * Config ) (interface {}, error ) {
3517
+ return v , nil
3518
+ }
3519
+
3498
3520
func expandCloudBuildTriggerBuildArtifacts (v interface {}, d TerraformResourceData , config * Config ) (interface {}, error ) {
3499
3521
l := v .([]interface {})
3500
3522
if len (l ) == 0 || l [0 ] == nil {
0 commit comments