Trying to use Fn :: Join Fn :: FindInMap as shown below:
"SubnetId": {
"Fn::FindInMap": [
{
"Ref": "OrganizationName"
},
"AZ",
{
"Fn::Join": [
"",
[
{
"Ref": "Environment"
},
{
"Ref": "Member1AZ"
}
]
]
}
]
}
The elements OrganizationName, Environment, and Member1AZ are parameters. Essentially, it should connect to my comparisons and produce, for example:
"SubnetId" : { "Fn::FindInMap" : [ "Organization2", "AZ", "prod1c" ]}
However, it does not seem to output the result from Fn :: Join as the only object in Fn :: FindInMap, it correctly checks if I hardcode this section of the template.
A client error (ValidationError) occurred when calling the ValidateTemplate operation: Template error: every Fn::FindInMap object requires three parameters, the map name, map key and the attribute for return value
My mappings are as follows:
Mappings" : {
"OrganizationDefaults" : {
"AZ" : {
"prod1a" : "subnet-foobar1",
"qa1a" : "subnet-foobar2",
"prod1c" : "subnet-foobar3",
"qa1c" : "subnet-foobar4"
}
},
"OrganizationTwo" : {
"AZ" : {
"prod1a" : "subnet-foobar5",
"qa1a" : "subnet-foobar6",
"prod1c" : "subnet-foobar7",
"qa1c" : "subnet-foobar8"
}
},
},
Could someone help with this or should have done something like this before? I need to use the same template for any listed organizations, so Mappings should solve this for me if I can fix it.