Closed amit2793 closed 5 years ago
issue resolved, re-written the whole code
i have to rewrite the code from start, everytime i make new entry in template , it shows this error:"Error while uploading file Template validation error: Invalid template property or properties [mysecuritygroup, subnet1, subnet2, subnet3, subnet4]
kindly help...
{ "AWSTemplateFormatVersion": "2010-09-09", "Description" : "Complex network", "Parameters" :{
"vpccidrblock":{
"Description" : "CIDR Block for VPC",
"Type": "String",
"Default": "10.0.0.0/16"
},
"subnet1cidr": {
"Description": "Subnet 1 CIDR",
"Type": "String",
"Default":"10.0.0.0/24"
},
"subnet2cidr": {
"Description": "Subnet 1 CIDR",
"Type": "String",
"Default":"10.0.1.0/24"
},
"subnet3cidr": {
"Description": "Subnet 1 CIDR",
"Type": "String",
"Default": "10.0.2.0/24"
},
"subnet4cidr": {
"Description": "Subnet 1 CIDR",
"Type": "String",
"Default": "10.0.3.0/24"
}
},
"subnet1az" :{
"Description": "az of subnet1",
"Type": "AWS::EC2::AvailabilityZone::Name"
},
"subnet2az" :{
"Description": "az of subnet2",
"Type": "AWS::EC2::AvailabilityZone::Name"
},
"subnet3az" :{
"Description": "az of subnet3",
"Type": "AWS::EC2::AvailabilityZone::Name"
},
"subnet4az" :{
"Description": "az of subnet4",
"Type": "AWS::EC2::AvailabilityZone::Name"
},
"Resources":{
"myvpc": {
"Type":"AWS::EC2::VPC",
"Properties": {
"CidrBlock" : {"Ref" : "vpccidrblock"}
}
},
"subnet1":{
"Type":"AWS::EC2::Subnet",
"Properties":{
"AvailabilityZone": {"Ref": "subnet1az" },
"VpcId": { "Ref": "myvpc"},
"CidrBlock":{"Ref": "subnet1cidr" }
}
},
"subnet2": {
"Type":"AWS::EC2::Subnet",
"Properties":{
"AvailabilityZone": {"Ref": "subnet2az" },
"VpcId": { "Ref": "myvpc"},
"CidrBlock":{"Ref": "subnet2cidr" }
}
},
"subnet3":{
"Type":"AWS::EC2::Subnet",
"Properties":{
"AvailabilityZone": {"Ref": "subnet3az" },
"VpcId": { "Ref": "myvpc"},
"CidrBlock":{"Ref": "subnet3cidr" }
}
},
"subnet4":{
"Type":"AWS::EC2::Subnet",
"Properties":{
"AvailabilityZone": {"Ref": "subnet4az" },
"VpcId": { "Ref": "myvpc"},
"CidrBlock":{"Ref": "subnet4cidr" }
}
},
"mySecuritygroup":{
"Type":"AWS::EC2::SecurityGroup",
"Properties":{
"GroupName" : "AllowSSH",
"GroupDescription": "This Group is for allowing ssh",
"VpcId" : {"Ref" : "myvpc"}
}
}
}
}
{ "AWSTemplateFormatVersion": "2010-09-09", "Description" : "Simple network", "Parameters" :{
}
Error while uploading file Template validation error: Invalid template property or properties [mysecuritygroup, subnet1, subnet2, subnet3, subnet4]
please suggest.