ecr: When creating multiple repositories, the provider role only includes one in its policy #25308
Labels
@aws-cdk/aws-iam
Related to AWS Identity and Access Management
bug
This issue is a bug.
effort/medium
Medium work item – several days of effort
p1
Describe the bug
When creating multiple repositories using the Repository construct in conjunction with an aws lifecycle policy, only one of the repositories is added to the CustomECRAutoDeleteImagesCustomResourceProviderRole policy resources.
Expected Behavior
Both repositories are added to the role policy resources e.g.
"Resource": [ { "Fn::GetAtt": [ "Repository15A6F32E1", "Arn" ] }, { "Fn::GetAtt": [ "Repository25C81E63B", "Arn" ] } ]
Current Behavior
Only the first repository is added to the role policy resources e.g.
"Resource": [ { "Fn::GetAtt": [ "Repository15A6F32E1", "Arn" ] } ]
Reproduction Steps
I have the following stack defined:
Using this stack e.g.
results in the following role template:
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.70.0 (build c13a0f1)
Framework Version
No response
Node.js Version
v16.18.1
OS
Amazon Linux 2
Language
Typescript
Language Version
4.9.5
Other information
No response
The text was updated successfully, but these errors were encountered: