aws_iam: CfnPolicy optional properties are in practice required #31424
Labels
@aws-cdk/aws-iam
Related to AWS Identity and Access Management
bug
This issue is a bug.
p3
response-requested
Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Describe the bug
CfnPolicyProps
defines theroles
,users
, andgroups
properties as optional however you run into an error during deployment if you do not assign a value to one of them.Regression Issue
Last Known Working CDK Version
No response
Expected Behavior
You should be able to create a
CfnPolicy
construct without assigning a value to itsusers
,roles
andgroups
properties. As per theCfnPolicyProps
in the source code:Current Behavior
When you create a
CfnPolicy
without assigning a value to theusers
,groups
androles
properties then during deployment the following error is thrown:Reproduction Steps
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.158.0
Framework Version
2.158.0
Node.js Version
22.8.0
OS
MacOS Sonoma 14.6.1
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: