【发布时间】:2017-12-26 04:14:02
【问题描述】:
我在VPC 中由cloudformation 和EFS 创建,此VPC 包含很少的EC2 instances。
我还需要为每个子网创建挂载目标。
这个cloudformation模板可以在不同的AWS accounts中执行。
如何知道创建了多少Mount targets资源?
我可以在帐户 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" } ]
}
},
【问题讨论】:
标签: json amazon-web-services amazon-cloudformation amazon-efs mount-point