CfnMapping.find_in_map: Template Validation Error When Optional default_value
is not specified.
#27987
Labels
@aws-cdk/aws-cloudformation
Related to AWS CloudFormation
bug
This issue is a bug.
closed-for-staleness
This issue was automatically closed because it hadn't received any attention in a while.
effort/medium
Medium work item – several days of effort
p2
response-requested
Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Describe the bug
The following code synthesizes successfully but produces a template error in the CloudFormation console:
According to the docs the default_value parameter is optional.
If the
default_value
parameter is specified the synthesized template deploys successfully.Expected Behavior
The synthesized cloudformation template can be deployed without error.
Current Behavior
An error message is displayed in the CloudFormation console:
Template error: every Fn::FindInMap object requires three parameters, the map name, map key and the attribute for return value.
Reproduction Steps
find_in_map
method without specifying thedefault_value
parameter.Possible Solution
Either account for the cloudformation API requirement by making the
default_value
parameter required or fix the API to support this parameter being optional.Additional Information/Context
No response
CDK CLI Version
2.106.1 (build a2e5f65)
Framework Version
No response
Node.js Version
v21.1.0
OS
Mac
Language
Python
Language Version
3.12.0
Other information
No response
The text was updated successfully, but these errors were encountered: