Skip to content

Commit

Permalink
r/aws_iot_topic_rule: Make update retry similar to create.
Browse files Browse the repository at this point in the history
  • Loading branch information
ewbankkit committed Jul 3, 2024
1 parent 762af66 commit 43d5c83
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions internal/service/iot/topic_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -1379,9 +1379,10 @@ func resourceTopicRuleUpdate(ctx context.Context, d *schema.ResourceData, meta i
TopicRulePayload: expandTopicRulePayload(d),
}

_, err := tfresource.RetryWhenIsAErrorMessageContains[*awstypes.InvalidRequestException](ctx, propagationTimeout, func() (interface{}, error) {
return conn.ReplaceTopicRule(ctx, input)
}, "unable to assume role")
_, 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 43d5c83

Please sign in to comment.