mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-01 16:21:06 +00:00
Use the project defined in the trigger_template when creating trigger (#1556)
When creating a trigger by using the project defined in the schema we enforce that the repo must be in that same project. We should be looking at the project defined in the trigger_template data and falling back to that first project if not found. Closes: #1555
This commit is contained in:
parent
cdcda8384a
commit
cd83bab7dc
@ -191,7 +191,7 @@ func expandCloudbuildBuildTriggerTemplate(d *schema.ResourceData, project string
|
||||
return nil
|
||||
}
|
||||
tmpl := &cloudbuild.RepoSource{}
|
||||
if v, ok := d.GetOk("project"); ok {
|
||||
if v, ok := d.GetOk("trigger_template.0.project"); ok {
|
||||
tmpl.ProjectId = v.(string)
|
||||
} else {
|
||||
tmpl.ProjectId = project
|
||||
|
Loading…
Reference in New Issue
Block a user