diff --git a/google/cloudbuild_trigger.go b/google/cloudbuild_trigger.go index 4368fc421..f1d7c61b3 100644 --- a/google/cloudbuild_trigger.go +++ b/google/cloudbuild_trigger.go @@ -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 @@ -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 }