Skip to content

Commit

Permalink
Merge pull request #39190 from aleksandarknezevic/f-ecr-policy-iam-role
Browse files Browse the repository at this point in the history
fixed iam role in ecr repository
  • Loading branch information
jar-b authored Sep 9, 2024
2 parents 2c552c3 + 607339e commit ccf99b0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .changelog/39190.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
resource/aws_ecr_repository_policy: Fix retry logic handling eventual consistency of newly created IAM roles
```
2 changes: 1 addition & 1 deletion internal/service/ecr/repository_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func resourceRepositoryPolicyPut(ctx context.Context, d *schema.ResourceData, me

_, err = tfresource.RetryWhenIsAErrorMessageContains[*types.InvalidParameterException](ctx, propagationTimeout, func() (interface{}, error) {
return conn.SetRepositoryPolicy(ctx, input)
}, "Invalid repository policy provided")
}, "Principal not found")

if err != nil {
return sdkdiag.AppendErrorf(diags, "putting ECR Repository Policy (%s): %s", repositoryName, err)
Expand Down

0 comments on commit ccf99b0

Please sign in to comment.