Describe the feature
Cloudformation recently added support for a default value in the FindInMap intrinsic function. AWS CDK should also support a default value.
Use Case
We use the CDK to synthesize cloudformation templates for deployment in multiple environments. Thus we are not able to use language features to replicate this functionality. We need to be able to use a default value when a parameter value does not exist in a mapping.
Proposed Solution
Add a Default parameter to the find_in_map method that would be used if no match is found in the mapping based on the provided 1st/2nd level keys.
Other Information
No response
Acknowledgements
CDK version used
latest
Environment details (OS name and version, etc.)
AWS Linux 2023, Ubuntu 22.04
Describe the feature
Cloudformation recently added support for a default value in the
FindInMapintrinsic function. AWS CDK should also support a default value.Use Case
We use the CDK to synthesize cloudformation templates for deployment in multiple environments. Thus we are not able to use language features to replicate this functionality. We need to be able to use a default value when a parameter value does not exist in a mapping.
Proposed Solution
Add a
Defaultparameter to the find_in_map method that would be used if no match is found in the mapping based on the provided 1st/2nd level keys.Other Information
No response
Acknowledgements
CDK version used
latest
Environment details (OS name and version, etc.)
AWS Linux 2023, Ubuntu 22.04