Skip to content

Commit

Permalink
Merge branch 'main' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
ewbankkit committed Jul 3, 2024
2 parents b843b98 + 09df920 commit 7828fc8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .changelog/36286.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
resource/aws_iot_topic_rule: Retry IAM eventual consistency errors on Update
```
5 changes: 4 additions & 1 deletion internal/service/iot/topic_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -1389,7 +1389,10 @@ func resourceTopicRuleUpdate(ctx context.Context, d *schema.ResourceData, meta i
TopicRulePayload: expandTopicRulePayload(d),
}

_, err := conn.ReplaceTopicRule(ctx, input)
_, err := tfresource.RetryWhenIsA[*awstypes.InvalidRequestException](ctx, propagationTimeout,
func() (interface{}, error) {
return conn.ReplaceTopicRule(ctx, input)
})

if err != nil {
return sdkdiag.AppendErrorf(diags, "replacing IoT Topic Rule (%s): %s", d.Id(), err)
Expand Down

0 comments on commit 7828fc8

Please sign in to comment.