Commit 49216a59 by Feanil Patel

Be able to paramatrize the admin subnets.

parent 14a09d0f
...@@ -99,10 +99,20 @@ ...@@ -99,10 +99,20 @@
"Type":"Number", "Type":"Number",
"Default":"8090" "Default":"8090"
}, },
"MongoServicePort":{ "VPCSubnet":{
"Description":"The TCP port for the deployment mongo server", "Description":"The subnet CIDR for the whole VPC.",
"Type":"Number", "Type":"String",
"Default":"10001" "Default":"10.254.0.0/16"
},
"PrivateSubnet":{
"Description":"The subnet CIDR for the private VPC subnet.",
"Type":"String",
"Default":"10.254.0.0/24"
},
"PublicSubnet":{
"Description":"The subnet CIDR for the public VPC subnet.",
"Type":"String",
"Default":"10.254.1.0/24"
} }
}, },
"Mappings":{ "Mappings":{
...@@ -141,11 +151,6 @@ ...@@ -141,11 +151,6 @@
"ap-northeast-1": { "AMI":"ami-14d86d15" }, "ap-northeast-1": { "AMI":"ami-14d86d15" },
"sa-east-1": { "AMI":"ami-0439e619" } "sa-east-1": { "AMI":"ami-0439e619" }
}, },
"SubnetConfig":{
"VPC": { "CIDR":"10.0.0.0/16" },
"Public01": { "CIDR":"10.0.0.0/24" },
"Admin": { "CIDR":"10.0.185.0/24" }
},
"MapRegionsToAvailZones":{ "MapRegionsToAvailZones":{
"us-east-1": { "AZone2":"us-east-1d", "AZone0":"us-east-1b", "AZone1":"us-east-1c" }, "us-east-1": { "AZone2":"us-east-1d", "AZone0":"us-east-1b", "AZone1":"us-east-1c" },
"us-west-1": { "AZone0":"us-west-1a", "AZone2":"us-west-1b", "AZone1":"us-west-1c" }, "us-west-1": { "AZone0":"us-west-1a", "AZone2":"us-west-1b", "AZone1":"us-west-1c" },
...@@ -163,7 +168,7 @@ ...@@ -163,7 +168,7 @@
"Properties":{ "Properties":{
"EnableDnsSupport" : "true", "EnableDnsSupport" : "true",
"EnableDnsHostnames" : "true", "EnableDnsHostnames" : "true",
"CidrBlock":"10.0.0.0/16", "CidrBlock": { "Ref": "VPCSubnet" },
"InstanceTenancy":"default" "InstanceTenancy":"default"
} }
}, },
...@@ -173,13 +178,7 @@ ...@@ -173,13 +178,7 @@
"VpcId":{ "VpcId":{
"Ref":"AdminVPC" "Ref":"AdminVPC"
}, },
"CidrBlock":{ "CidrBlock":{ "Ref": "PublicSubnet" },
"Fn::FindInMap":[
"SubnetConfig",
"Public01",
"CIDR"
]
},
"AvailabilityZone":{ "AvailabilityZone":{
"Fn::FindInMap":[ "Fn::FindInMap":[
"MapRegionsToAvailZones", "MapRegionsToAvailZones",
...@@ -201,13 +200,7 @@ ...@@ -201,13 +200,7 @@
"VpcId":{ "VpcId":{
"Ref":"AdminVPC" "Ref":"AdminVPC"
}, },
"CidrBlock":{ "CidrBlock":{ "Ref": "PrivateSubnet" },
"Fn::FindInMap":[
"SubnetConfig",
"Admin",
"CIDR"
]
},
"AvailabilityZone":{ "AvailabilityZone":{
"Fn::FindInMap":[ "Fn::FindInMap":[
"MapRegionsToAvailZones", "MapRegionsToAvailZones",
...@@ -589,12 +582,6 @@ ...@@ -589,12 +582,6 @@
"FromPort":"443", "FromPort":"443",
"ToPort":"443", "ToPort":"443",
"CidrIp":"0.0.0.0/0" "CidrIp":"0.0.0.0/0"
},
{
"IpProtocol":"tcp",
"FromPort":{ "Ref": "MongoServicePort" },
"ToPort":{ "Ref": "MongoServicePort" },
"CidrIp":"0.0.0.0/0"
} }
], ],
"SecurityGroupEgress":[ "SecurityGroupEgress":[
...@@ -617,12 +604,6 @@ ...@@ -617,12 +604,6 @@
"FromPort":"443", "FromPort":"443",
"ToPort":"443", "ToPort":"443",
"CidrIp":"0.0.0.0/0" "CidrIp":"0.0.0.0/0"
},
{
"IpProtocol":"tcp",
"FromPort":{ "Ref": "MongoServicePort" },
"ToPort":{ "Ref": "MongoServicePort" },
"CidrIp":"0.0.0.0/0"
} }
] ]
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment