試圖使用Fn ::內FN :: FindInMap如下加入,:AWS Cloudformation:Fn ::在Fn :: FindInMap語句中加入?
"SubnetId": {
"Fn::FindInMap": [
{
"Ref": "OrganizationName"
},
"AZ",
{
"Fn::Join": [
"",
[
{
"Ref": "Environment"
},
{
"Ref": "Member1AZ"
}
]
]
}
]
}
的單位名稱,環境和Member1AZ是所有參數。本質上,它應該掛鉤到我的映射和生產,例如:
"SubnetId" : { "Fn::FindInMap" : [ "Organization2", "AZ", "prod1c" ]}
但是,它似乎並沒有服用從FN ::加入作爲新生力量:: FindInMap,一個單一實體輸出如果我硬編碼該模板的該部分,則會正確驗證。
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
我的映射如下:在這個
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"
}
},
},
能
任何人的幫助,或者有前做同樣的事情?我需要爲列出的任何組織使用相同的模板,因此如果我能夠做到,Mappings應該爲我解決這個問題。