Open drobbins-ancile opened 10 months ago
I didn't see the definition of your environment
and it could due to not resolvable.
What if you change the environment
to a static value? Does it work?
btw, I noticed you are using node v21 which we haven't fully tested and we've seen some issues with v21. I would highly recommend fall back to v20 instead.
I didn't see the definition of your
environment
and it could due to not resolvable.What if you change the
environment
to a static value? Does it work?
Apologies for not including it in the original code snipppets. environment
is a cloudformation stack parameter:
environment = CfnParameter(self, "Environment")
In the synthesized template it appears to be correct:
"Fn::FindInMap": [
"IpSetMapping",
{
"Fn::Sub": "${AWS::Region}"
},
{
"Ref": "Environment" <- here
},
{
"DefaultValue": "arn:aws:wafv2:us-east-1:638051133977:regional/ipset/Beta-NatGateway-IPs/a2d011ef-1756-4563-9466-ad5615420c45"
}
]
Did you mean it synthesized correct but when you deploy, CFN fails with error?
This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.
Did you mean it synthesized correct but when you deploy, CFN fails with error?
Correct.
Describe the bug
When attempting to deploy a stack that was successfully synthesized using the following code:
The synthesized template shows:
The change set validation/stack deployment fails with
Template error: every Fn::FindInMap object requires three parameters, the map name, map key and the attribute for return value.
I have also tried adding the map name:
According to the documentation my code appears to be correct.
Expected Behavior
The synthesized stack deploys successfully.
Current Behavior
The change set validation/stack deployment fails with
Template error: every Fn::FindInMap object requires three parameters, the map name, map key and the attribute for return value.
Reproduction Steps
Synthesize and attempt to deploy a template using code similar to:
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.115.0 (build 58027ee)
Framework Version
No response
Node.js Version
21.4.0
OS
MacOS
Language
Python
Language Version
3.12.0
Other information
No response