我正在尝试在嵌套CloudFormation堆栈中重用旧的VPC和ELB模板。
VPC模板:
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "AppVPC",
"Resources" : {
"AppVPC" : {
"Type" : "AWS::EC2::VPC",
"Properties" : {
"CidrBlock" : "10.100.0.0/16",
"EnableDnsSupport" : "true",
"EnableDnsHostnames" : "true",
"InstanceTenancy" : "default",
"Tags" : [ {"Key" : "Name", "Value" : "appvpc"} ]
}
},
"Pub1" :{
"Type" : "AWS::EC2::Subnet",
"Properties" : {
"VpcId" : { "Ref": "AppVPC" },
"CidrBlock" : "10.100.64.0/26",
"AvailabilityZone" : "us-east-1a",
"Tags" : [ {"Key" : "Name", "Value" : "public-1"} ]
}
} ,
"Outputs" : …Run Code Online (Sandbox Code Playgroud)