Skip to content

Commit

Permalink
update when no change to tags
Browse files Browse the repository at this point in the history
  • Loading branch information
DrFaust92 committed Jan 4, 2022
1 parent da58c64 commit e2132af
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions internal/service/codepipeline/codepipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -593,17 +593,19 @@ func resourceCodePipelineRead(d *schema.ResourceData, meta interface{}) error {
func resourceCodePipelineUpdate(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*conns.AWSClient).CodePipelineConn

pipeline, err := expand(d)
if err != nil {
return err
}
params := &codepipeline.UpdatePipelineInput{
Pipeline: pipeline,
}
_, err = conn.UpdatePipeline(params)
if d.HasChangesExcept("tags", "tags_all") {
pipeline, err := expand(d)
if err != nil {
return err
}
params := &codepipeline.UpdatePipelineInput{
Pipeline: pipeline,
}
_, err = conn.UpdatePipeline(params)

if err != nil {
return fmt.Errorf("[ERROR] Error updating CodePipeline (%s): %w", d.Id(), err)
if err != nil {
return fmt.Errorf("[ERROR] Error updating CodePipeline (%s): %w", d.Id(), err)
}
}

arn := d.Get("arn").(string)
Expand Down

0 comments on commit e2132af

Please sign in to comment.