aws-cdk-lib: incorrect rendering of CfnParameter in Fn.sub #28385
Labels
@aws-cdk/core
Related to core CDK functionality
bug
This issue is a bug.
effort/medium
Medium work item – several days of effort
p3
Describe the bug
The CloudFormation template generated by
cdk synth
is invalid ifCfnParameter
is inFn.sub
.Similar to #14047 and #14068
Expected Behavior
The cdk code is valid after
cdk synth
runsCurrent Behavior
$ cfn-lint cdk.out/HelloWorldStack.template.json E1019 Sub should be a string or array of 2 items for Resources/helloworldfunctionServiceRole6902C513/Properties/Tags/0/Value/Fn::Sub cdk.out/HelloWorldStack.template.json:46:8
Reproduction Steps
$ cdk synth $ cfn-lint cdk.out/HelloWorldStack.template.json E1019 Sub should be a string or array of 2 items for Resources/helloworldfunctionServiceRole6902C513/Properties/Tags/0/Value/Fn::Sub cdk.out/HelloWorldStack.template.json:46:8
Possible Solution
No response
Additional Information/Context
There is no issue if it is in the following format.
CDK CLI Version
2.113.0 (build ccd534a)
Framework Version
No response
Node.js Version
v20.0.0
OS
MacOS
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: