2
我通過cloudformation
創建了一個EFS
在VPC
中,此VPC包含幾個EC2 instances
。如何知道由Cloudformation創建多少個Mount目標
我需要爲每個子網創建和安裝目標。
這個雲信息模板可以在不同的AWS accounts
中執行。 如何知道如何創建資源?
我可以在帳戶1 VPC的3 subnets
,帳戶2另一個VPC 2 subnets
...
如何使模板通用,這樣它根據每個帳戶的環境裏去?
"FileSystem" : {
"Type" : "AWS::EFS::FileSystem",
"Properties" : {
"FileSystemTags" : [
{
"Key" : "Name",
"Value" : "FileSystem"
}
]
}
},
"MountTarget1": {
"Type": "AWS::EFS::MountTarget",
"Properties": {
"FileSystemId": { "Ref": "FileSystem" },
"SubnetId": { "Ref": "Subnet1" },
"SecurityGroups": [ { "Ref": "MountTargetSecurityGroup" } ]
}
},
"MountTarget2": {
"Type": "AWS::EFS::MountTarget",
"Properties": {
"FileSystemId": { "Ref": "FileSystem" },
"SubnetId": { "Ref": "Subnet2" },
"SecurityGroups": [ { "Ref": "MountTargetSecurityGroup" } ]
}
},