Skip to content

Commit

Permalink
Add service_account to google_cloudbuild_trigger (#5237) (#788)
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Sep 24, 2021
1 parent f18dc63 commit a179106
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions google/cloudbuild_trigger.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@ func GetCloudBuildTriggerApiObject(d TerraformResourceData, config *Config) (map
} else if v, ok := d.GetOkExists("substitutions"); !isEmptyValue(reflect.ValueOf(substitutionsProp)) && (ok || !reflect.DeepEqual(v, substitutionsProp)) {
obj["substitutions"] = substitutionsProp
}
serviceAccountProp, err := expandCloudBuildTriggerServiceAccount(d.Get("service_account"), d, config)
if err != nil {
return nil, err
} else if v, ok := d.GetOkExists("service_account"); !isEmptyValue(reflect.ValueOf(serviceAccountProp)) && (ok || !reflect.DeepEqual(v, serviceAccountProp)) {
obj["serviceAccount"] = serviceAccountProp
}
filenameProp, err := expandCloudBuildTriggerFilename(d.Get("filename"), d, config)
if err != nil {
return nil, err
Expand Down Expand Up @@ -192,6 +198,10 @@ func expandCloudBuildTriggerSubstitutions(v interface{}, d TerraformResourceData
return m, nil
}

func expandCloudBuildTriggerServiceAccount(v interface{}, d TerraformResourceData, config *Config) (interface{}, error) {
return v, nil
}

func expandCloudBuildTriggerFilename(v interface{}, d TerraformResourceData, config *Config) (interface{}, error) {
return v, nil
}
Expand Down

0 comments on commit a179106

Please sign in to comment.