aws-iam: Calling grant methods with immutable role fails silently #25952
Labels
@aws-cdk/aws-iam
Related to AWS Identity and Access Management
bug
This issue is a bug.
duplicate
This issue is a duplicate.
effort/medium
Medium work item – several days of effort
feature-request
A feature should be added or improved.
p2
Describe the bug
Calling
grantEncryptDecrypt
on a KMS key when passing an immutable role fails silently. No errors or warning are shown during synthesis.Expected Behavior
Calling a
grant*
methods with an immutable role should raise an error, or at a minimum a warning, during synthesis. It's unexpected behaviour that callinggrantEncryptDecrypt
has no effect if the role has{ mutable: false }
set.Current Behavior
Calling
grantEncryptDecrypt
as shown in the snippet above has no effect. No IAM policy is created and no errors or warnings are emitted.Reproduction Steps
See above snippet.
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.79.1
Framework Version
No response
Node.js Version
18
OS
MacOS
Language
Typescript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: