Skip to content

Commit

Permalink
add trigger_id to cloudbuild_build_trigger, send it on update (#2743)
Browse files Browse the repository at this point in the history
  • Loading branch information
modular-magician authored and danawillow committed Dec 22, 2018
1 parent 2b2e007 commit 569d740
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions google/resource_cloudbuild_build_trigger.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ func resourceCloudBuildTrigger() *schema.Resource {
},
},
},
"trigger_id": {
Type: schema.TypeString,
Computed: true,
},
},
}
}
Expand Down Expand Up @@ -188,6 +192,7 @@ func resourceCloudbuildBuildTriggerRead(d *schema.ResourceData, meta interface{}
d.Set("substitutions", buildTrigger.Substitutions)
d.Set("ignored_files", buildTrigger.IgnoredFiles)
d.Set("included_files", buildTrigger.IncludedFiles)
d.Set("trigger_id", buildTrigger.Id)

if buildTrigger.TriggerTemplate != nil {
d.Set("trigger_template", flattenCloudbuildBuildTriggerTemplate(d, config, buildTrigger.TriggerTemplate))
Expand All @@ -214,6 +219,7 @@ func resourceCloudbuildBuildTriggerUpdate(d *schema.ResourceData, meta interface
if err != nil {
return err
}
buildTrigger.Id = d.Get("trigger_id").(string)

id := d.Id()

Expand Down

0 comments on commit 569d740

Please sign in to comment.