Adding a condition to a policy statement removes all conditions with the same operator #6630
Labels
@aws-cdk/aws-iam
Related to AWS Identity and Access Management
bug
This issue is a bug.
in-progress
This issue is being actively worked on.
needs-triage
This issue or PR still needs to be triaged.
I believe this is related to #3227, but this might be a simpler (and maybe easier to solve) case.
When a condition is added to a policy statement it will delete any policies using the same operator that already exist. This is caused by this line:
aws-cdk/packages/@aws-cdk/aws-iam/lib/policy-statement.ts
Line 170 in 6021408
Reproduction Steps
C# example:
The condition that should be generated by the
ViaServicePrincipal
is entirely missing from the output, but the account condition will be present.Environment
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: