diff --git a/.changelog/39190.txt b/.changelog/39190.txt new file mode 100644 index 00000000000..0c9db79a8a7 --- /dev/null +++ b/.changelog/39190.txt @@ -0,0 +1,3 @@ +```release-note:bug +resource/aws_ecr_repository_policy: Fix retry logic handling eventual consistency of newly created IAM roles +``` diff --git a/internal/service/ecr/repository_policy.go b/internal/service/ecr/repository_policy.go index 18bda9244de..61388c2fcde 100644 --- a/internal/service/ecr/repository_policy.go +++ b/internal/service/ecr/repository_policy.go @@ -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)