Skip to content

Instantly share code, notes, and snippets.

@Twinuma
Last active August 29, 2015 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Twinuma/f8d9dcd7c31743daf72e to your computer and use it in GitHub Desktop.
Save Twinuma/f8d9dcd7c31743daf72e to your computer and use it in GitHub Desktop.
CloudFormationを使って開発・ステージング・本番環境を自動構築する
{
"AWSTemplateFormatVersion": "2010-09-09",
"Resources": {
"vpcf84de09d": {
"Type": "AWS::EC2::VPC",
"Properties": {
"CidrBlock": "10.0.0.0/16",
"InstanceTenancy": "default",
"EnableDnsSupport": "true",
"EnableDnsHostnames": "true",
"Tags": [
{
"Key": "Name",
"Value": "PRODUCTION_VPC"
}
]
}
},
"vpcf54de090": {
"Type": "AWS::EC2::VPC",
"Properties": {
"CidrBlock": "10.0.0.0/16",
"InstanceTenancy": "default",
"EnableDnsSupport": "true",
"EnableDnsHostnames": "true",
"Tags": [
{
"Key": "Name",
"Value": "DEV_VPC"
}
]
}
},
"vpcf34de096": {
"Type": "AWS::EC2::VPC",
"Properties": {
"CidrBlock": "10.0.0.0/16",
"InstanceTenancy": "default",
"EnableDnsSupport": "true",
"EnableDnsHostnames": "true",
"Tags": [
{
"Key": "Name",
"Value": "STAGING_VPC"
}
]
}
},
"subnet0d2cfc54": {
"Type": "AWS::EC2::Subnet",
"Properties": {
"CidrBlock": "10.0.2.0/24",
"AvailabilityZone": "ap-northeast-1c",
"VpcId": {
"Ref": "vpcf54de090"
},
"Tags": [
{
"Key": "Name",
"Value": "DEV_DMZ_1c"
}
]
}
},
"subnetf52cfcac": {
"Type": "AWS::EC2::Subnet",
"Properties": {
"CidrBlock": "10.0.4.0/24",
"AvailabilityZone": "ap-northeast-1c",
"VpcId": {
"Ref": "vpcf34de096"
},
"Tags": [
{
"Key": "Name",
"Value": "STG_TRUST_1c"
}
]
}
},
"subnet10cf7667": {
"Type": "AWS::EC2::Subnet",
"Properties": {
"CidrBlock": "10.0.1.0/24",
"AvailabilityZone": "ap-northeast-1b",
"VpcId": {
"Ref": "vpcf34de096"
},
"Tags": [
{
"Key": "Name",
"Value": "STG_DMZ_1b"
}
]
}
},
"subnet922cfccb": {
"Type": "AWS::EC2::Subnet",
"Properties": {
"CidrBlock": "10.0.2.0/24",
"AvailabilityZone": "ap-northeast-1c",
"VpcId": {
"Ref": "vpcf84de09d"
},
"Tags": [
{
"Key": "Name",
"Value": "PRD_DMZ_1c"
}
]
}
},
"subnetd12dfd88": {
"Type": "AWS::EC2::Subnet",
"Properties": {
"CidrBlock": "10.0.4.0/24",
"AvailabilityZone": "ap-northeast-1c",
"VpcId": {
"Ref": "vpcf54de090"
},
"Tags": [
{
"Key": "Name",
"Value": "DEV_TRUST_1c"
}
]
}
},
"subnet23ce7754": {
"Type": "AWS::EC2::Subnet",
"Properties": {
"CidrBlock": "10.0.3.0/24",
"AvailabilityZone": "ap-northeast-1b",
"VpcId": {
"Ref": "vpcf54de090"
},
"Tags": [
{
"Key": "Name",
"Value": "DEV_TRUST_1b"
}
]
}
},
"subnetfa2cfca3": {
"Type": "AWS::EC2::Subnet",
"Properties": {
"CidrBlock": "10.0.2.0/24",
"AvailabilityZone": "ap-northeast-1c",
"VpcId": {
"Ref": "vpcf34de096"
},
"Tags": [
{
"Key": "Name",
"Value": "STG_DMZ_1c"
}
]
}
},
"subnetd6cf76a1": {
"Type": "AWS::EC2::Subnet",
"Properties": {
"CidrBlock": "10.0.5.0/24",
"AvailabilityZone": "ap-northeast-1b",
"VpcId": {
"Ref": "vpcf84de09d"
},
"Tags": [
{
"Key": "Name",
"Value": "PRD_NAT_1b"
}
]
}
},
"subnet06cf7671": {
"Type": "AWS::EC2::Subnet",
"Properties": {
"CidrBlock": "10.0.3.0/24",
"AvailabilityZone": "ap-northeast-1b",
"VpcId": {
"Ref": "vpcf34de096"
},
"Tags": [
{
"Key": "Name",
"Value": "STG_TRUST_1b"
}
]
}
},
"subnete6cf7691": {
"Type": "AWS::EC2::Subnet",
"Properties": {
"CidrBlock": "10.0.1.0/24",
"AvailabilityZone": "ap-northeast-1b",
"VpcId": {
"Ref": "vpcf84de09d"
},
"Tags": [
{
"Key": "Name",
"Value": "PRD_DMZ_1b"
}
]
}
},
"subnet6dcf761a": {
"Type": "AWS::EC2::Subnet",
"Properties": {
"CidrBlock": "10.0.1.0/24",
"AvailabilityZone": "ap-northeast-1b",
"VpcId": {
"Ref": "vpcf54de090"
},
"Tags": [
{
"Key": "Name",
"Value": "DEV_DMZ_1b"
}
]
}
},
"subnet992cfcc0": {
"Type": "AWS::EC2::Subnet",
"Properties": {
"CidrBlock": "10.0.6.0/24",
"AvailabilityZone": "ap-northeast-1c",
"VpcId": {
"Ref": "vpcf34de096"
},
"Tags": [
{
"Key": "Name",
"Value": "STG_NAT_1c"
}
]
}
},
"subnet802cfcd9": {
"Type": "AWS::EC2::Subnet",
"Properties": {
"CidrBlock": "10.0.6.0/24",
"AvailabilityZone": "ap-northeast-1c",
"VpcId": {
"Ref": "vpcf84de09d"
},
"Tags": [
{
"Key": "Name",
"Value": "PRD_NAT_1c"
}
]
}
},
"subnet8a2cfcd3": {
"Type": "AWS::EC2::Subnet",
"Properties": {
"CidrBlock": "10.0.4.0/24",
"AvailabilityZone": "ap-northeast-1c",
"VpcId": {
"Ref": "vpcf84de09d"
},
"Tags": [
{
"Key": "Name",
"Value": "PRD_TRUST_1c"
}
]
}
},
"subnetf1cf7686": {
"Type": "AWS::EC2::Subnet",
"Properties": {
"CidrBlock": "10.0.5.0/24",
"AvailabilityZone": "ap-northeast-1b",
"VpcId": {
"Ref": "vpcf34de096"
},
"Tags": [
{
"Key": "Name",
"Value": "STG_NAT_1b"
}
]
}
},
"subnetefcf7698": {
"Type": "AWS::EC2::Subnet",
"Properties": {
"CidrBlock": "10.0.3.0/24",
"AvailabilityZone": "ap-northeast-1b",
"VpcId": {
"Ref": "vpcf84de09d"
},
"Tags": [
{
"Key": "Name",
"Value": "PRD_TRUST_1b"
}
]
}
},
"igw4eb2722b": {
"Type": "AWS::EC2::InternetGateway",
"Properties": {
"Tags": [
{
"Key": "Name",
"Value": "STG_INT_GATEWAY"
}
]
}
},
"igw4fb2722a": {
"Type": "AWS::EC2::InternetGateway",
"Properties": {
"Tags": [
{
"Key": "Name",
"Value": "PRD_INT_GATEWAY"
}
]
}
},
"igw48b2722d": {
"Type": "AWS::EC2::InternetGateway",
"Properties": {
"Tags": [
{
"Key": "Name",
"Value": "DEV_INT_GATEWAY"
}
]
}
},
"dopt6d3d360f": {
"Type": "AWS::EC2::DHCPOptions",
"Properties": {
"DomainName": "ap-northeast-1.compute.internal",
"DomainNameServers": [
"AmazonProvidedDNS"
]
}
},
"acl802594e5": {
"Type": "AWS::EC2::NetworkAcl",
"Properties": {
"VpcId": {
"Ref": "vpcf34de096"
}
}
},
"aclbb2594de": {
"Type": "AWS::EC2::NetworkAcl",
"Properties": {
"VpcId": {
"Ref": "vpcf54de090"
}
}
},
"acl882594ed": {
"Type": "AWS::EC2::NetworkAcl",
"Properties": {
"VpcId": {
"Ref": "vpcf84de09d"
}
}
},
"rtb1a7fcd7f": {
"Type": "AWS::EC2::RouteTable",
"Properties": {
"VpcId": {
"Ref": "vpcf84de09d"
},
"Tags": [
{
"Key": "Name",
"Value": "PRD_INET_GATEWAY"
}
]
}
},
"rtb807ecce5": {
"Type": "AWS::EC2::RouteTable",
"Properties": {
"VpcId": {
"Ref": "vpcf54de090"
},
"Tags": [
{
"Key": "Name",
"Value": "DEV_INET_GATEWAY"
}
]
}
},
"rtb437cce26": {
"Type": "AWS::EC2::RouteTable",
"Properties": {
"VpcId": {
"Ref": "vpcf54de090"
},
"Tags": [
{
"Key": "Name",
"Value": "DEV_ENDPOINT"
}
]
}
},
"rtb107fcd75": {
"Type": "AWS::EC2::RouteTable",
"Properties": {
"VpcId": {
"Ref": "vpcf34de096"
},
"Tags": [
{
"Key": "Name",
"Value": "STG_INET_GATEWAY"
}
]
}
},
"rtbe87fcd8d": {
"Type": "AWS::EC2::RouteTable",
"Properties": {
"VpcId": {
"Ref": "vpcf34de096"
},
"Tags": [
{
"Key": "Name",
"Value": "STG_NAT_TABLE"
}
]
}
},
"rtbad7eccc8": {
"Type": "AWS::EC2::RouteTable",
"Properties": {
"VpcId": {
"Ref": "vpcf54de090"
}
}
},
"rtbba7fcddf": {
"Type": "AWS::EC2::RouteTable",
"Properties": {
"VpcId": {
"Ref": "vpcf84de09d"
},
"Tags": [
{
"Key": "Name",
"Value": "PRD_ENDPOINT"
}
]
}
},
"rtbb27eccd7": {
"Type": "AWS::EC2::RouteTable",
"Properties": {
"VpcId": {
"Ref": "vpcf84de09d"
}
}
},
"rtbe07fcd85": {
"Type": "AWS::EC2::RouteTable",
"Properties": {
"VpcId": {
"Ref": "vpcf84de09d"
},
"Tags": [
{
"Key": "Name",
"Value": "PRD_NAT_TABLE"
}
]
}
},
"rtbb57eccd0": {
"Type": "AWS::EC2::RouteTable",
"Properties": {
"VpcId": {
"Ref": "vpcf34de096"
}
}
},
"rtb837fcde6": {
"Type": "AWS::EC2::RouteTable",
"Properties": {
"VpcId": {
"Ref": "vpcf34de096"
},
"Tags": [
{
"Key": "Name",
"Value": "STG_ENDPOINT"
}
]
}
},
"elbdevelb": {
"Type": "AWS::ElasticLoadBalancing::LoadBalancer",
"Properties": {
"Subnets": [
{
"Ref": "subnet0d2cfc54"
},
{
"Ref": "subnet6dcf761a"
}
],
"HealthCheck": {
"HealthyThreshold": "10",
"Interval": "30",
"Target": "HTTP:80/index.html",
"Timeout": "5",
"UnhealthyThreshold": "2"
},
"ConnectionDrainingPolicy": {
"Enabled": "true",
"Timeout": "300"
},
"ConnectionSettings": {
"IdleTimeout": "60"
},
"CrossZone": "true",
"SecurityGroups": [
{
"Ref": "sgdevelbsg"
}
],
"Listeners": [
{
"InstancePort": "80",
"LoadBalancerPort": "80",
"Protocol": "HTTP",
"InstanceProtocol": "HTTP"
}
],
"Tags": [
{
"Key": "Name",
"Value": "DEV_ELB"
}
]
}
},
"elbstgelb": {
"Type": "AWS::ElasticLoadBalancing::LoadBalancer",
"Properties": {
"Subnets": [
{
"Ref": "subnet10cf7667"
},
{
"Ref": "subnetfa2cfca3"
}
],
"HealthCheck": {
"HealthyThreshold": "10",
"Interval": "30",
"Target": "HTTP:80/index.html",
"Timeout": "5",
"UnhealthyThreshold": "2"
},
"ConnectionDrainingPolicy": {
"Enabled": "true",
"Timeout": "300"
},
"ConnectionSettings": {
"IdleTimeout": "60"
},
"CrossZone": "true",
"SecurityGroups": [
{
"Ref": "sgstgelbsg"
}
],
"Listeners": [
{
"InstancePort": "80",
"LoadBalancerPort": "80",
"Protocol": "HTTP",
"InstanceProtocol": "HTTP"
}
],
"Tags": [
{
"Key": "Name",
"Value": "STG_ELB"
}
]
}
},
"elbprdelb": {
"Type": "AWS::ElasticLoadBalancing::LoadBalancer",
"Properties": {
"Subnets": [
{
"Ref": "subnet922cfccb"
},
{
"Ref": "subnete6cf7691"
}
],
"HealthCheck": {
"HealthyThreshold": "10",
"Interval": "30",
"Target": "HTTP:80/index.html",
"Timeout": "5",
"UnhealthyThreshold": "2"
},
"ConnectionDrainingPolicy": {
"Enabled": "true",
"Timeout": "300"
},
"ConnectionSettings": {
"IdleTimeout": "60"
},
"CrossZone": "true",
"SecurityGroups": [
{
"Ref": "sgprdelbsg"
}
],
"Listeners": [
{
"InstancePort": "80",
"LoadBalancerPort": "80",
"Protocol": "HTTP",
"InstanceProtocol": "HTTP"
}
],
"Tags": [
{
"Key": "Name",
"Value": "PRD_ELB"
}
]
}
},
"dbsubnetdevrdssubnet": {
"Type": "AWS::RDS::DBSubnetGroup",
"Properties": {
"DBSubnetGroupDescription": "dev-rds-subnet",
"SubnetIds": [
{
"Ref": "subnetd12dfd88"
},
{
"Ref": "subnet23ce7754"
}
]
}
},
"dbsubnetstgrdssubnet": {
"Type": "AWS::RDS::DBSubnetGroup",
"Properties": {
"DBSubnetGroupDescription": "stg-rds-subnet",
"SubnetIds": [
{
"Ref": "subnet06cf7671"
},
{
"Ref": "subnetf52cfcac"
}
]
}
},
"dbsubnetprdrdssubnet": {
"Type": "AWS::RDS::DBSubnetGroup",
"Properties": {
"DBSubnetGroupDescription": "prd-rds-subnet",
"SubnetIds": [
{
"Ref": "subnet8a2cfcd3"
},
{
"Ref": "subnetefcf7698"
}
]
}
},
"dbpgmlrdsparam": {
"Type": "AWS::RDS::DBParameterGroup",
"Properties": {
"Description": "monstar rds db param",
"Family": "mysql5.6",
"Parameters": {
"binlog_cache_size": "32768",
"binlog_format": "MIXED",
"character_set_client": "utf8mb4",
"character_set_connection": "utf8mb4",
"character_set_database": "utf8mb4",
"character_set_results": "utf8mb4",
"character_set_server": "utf8mb4",
"explicit_defaults_for_timestamp": "1",
"innodb_buffer_pool_size": "{DBInstanceClassMemory*3/4}",
"innodb_file_per_table": "1",
"innodb_flush_method": "O_DIRECT"
}
}
},
"sgdevelbsg": {
"Type": "AWS::EC2::SecurityGroup",
"Properties": {
"GroupDescription": "dev elb sg",
"VpcId": {
"Ref": "vpcf54de090"
},
"Tags": [
{
"Key": "Name",
"Value": "dev-elb-sg"
}
]
}
},
"sgstgelbsg": {
"Type": "AWS::EC2::SecurityGroup",
"Properties": {
"GroupDescription": "stg-elb-sg",
"VpcId": {
"Ref": "vpcf34de096"
},
"Tags": [
{
"Key": "Name",
"Value": "stg-elb-sg"
}
]
}
},
"sgprdelbsg": {
"Type": "AWS::EC2::SecurityGroup",
"Properties": {
"GroupDescription": "prd-elb-sg",
"VpcId": {
"Ref": "vpcf84de09d"
},
"Tags": [
{
"Key": "Name",
"Value": "prd-elb-sg"
}
]
}
},
"acl7": {
"Type": "AWS::EC2::NetworkAclEntry",
"Properties": {
"CidrBlock": "0.0.0.0/0",
"Egress": "true",
"Protocol": "-1",
"RuleAction": "allow",
"RuleNumber": "100",
"NetworkAclId": {
"Ref": "acl802594e5"
}
}
},
"acl8": {
"Type": "AWS::EC2::NetworkAclEntry",
"Properties": {
"CidrBlock": "0.0.0.0/0",
"Protocol": "-1",
"RuleAction": "allow",
"RuleNumber": "100",
"NetworkAclId": {
"Ref": "acl802594e5"
}
}
},
"acl9": {
"Type": "AWS::EC2::NetworkAclEntry",
"Properties": {
"CidrBlock": "0.0.0.0/0",
"Egress": "true",
"Protocol": "-1",
"RuleAction": "allow",
"RuleNumber": "100",
"NetworkAclId": {
"Ref": "aclbb2594de"
}
}
},
"acl10": {
"Type": "AWS::EC2::NetworkAclEntry",
"Properties": {
"CidrBlock": "0.0.0.0/0",
"Protocol": "-1",
"RuleAction": "allow",
"RuleNumber": "100",
"NetworkAclId": {
"Ref": "aclbb2594de"
}
}
},
"acl11": {
"Type": "AWS::EC2::NetworkAclEntry",
"Properties": {
"CidrBlock": "0.0.0.0/0",
"Egress": "true",
"Protocol": "-1",
"RuleAction": "allow",
"RuleNumber": "100",
"NetworkAclId": {
"Ref": "acl882594ed"
}
}
},
"acl12": {
"Type": "AWS::EC2::NetworkAclEntry",
"Properties": {
"CidrBlock": "0.0.0.0/0",
"Protocol": "-1",
"RuleAction": "allow",
"RuleNumber": "100",
"NetworkAclId": {
"Ref": "acl882594ed"
}
}
},
"subnetacl17": {
"Type": "AWS::EC2::SubnetNetworkAclAssociation",
"Properties": {
"NetworkAclId": {
"Ref": "acl802594e5"
},
"SubnetId": {
"Ref": "subnetf52cfcac"
}
}
},
"subnetacl18": {
"Type": "AWS::EC2::SubnetNetworkAclAssociation",
"Properties": {
"NetworkAclId": {
"Ref": "acl802594e5"
},
"SubnetId": {
"Ref": "subnet992cfcc0"
}
}
},
"subnetacl19": {
"Type": "AWS::EC2::SubnetNetworkAclAssociation",
"Properties": {
"NetworkAclId": {
"Ref": "acl802594e5"
},
"SubnetId": {
"Ref": "subnetfa2cfca3"
}
}
},
"subnetacl20": {
"Type": "AWS::EC2::SubnetNetworkAclAssociation",
"Properties": {
"NetworkAclId": {
"Ref": "acl802594e5"
},
"SubnetId": {
"Ref": "subnetf1cf7686"
}
}
},
"subnetacl21": {
"Type": "AWS::EC2::SubnetNetworkAclAssociation",
"Properties": {
"NetworkAclId": {
"Ref": "acl802594e5"
},
"SubnetId": {
"Ref": "subnet10cf7667"
}
}
},
"subnetacl22": {
"Type": "AWS::EC2::SubnetNetworkAclAssociation",
"Properties": {
"NetworkAclId": {
"Ref": "acl802594e5"
},
"SubnetId": {
"Ref": "subnet06cf7671"
}
}
},
"subnetacl23": {
"Type": "AWS::EC2::SubnetNetworkAclAssociation",
"Properties": {
"NetworkAclId": {
"Ref": "aclbb2594de"
},
"SubnetId": {
"Ref": "subnetd12dfd88"
}
}
},
"subnetacl24": {
"Type": "AWS::EC2::SubnetNetworkAclAssociation",
"Properties": {
"NetworkAclId": {
"Ref": "aclbb2594de"
},
"SubnetId": {
"Ref": "subnet23ce7754"
}
}
},
"subnetacl25": {
"Type": "AWS::EC2::SubnetNetworkAclAssociation",
"Properties": {
"NetworkAclId": {
"Ref": "aclbb2594de"
},
"SubnetId": {
"Ref": "subnet0d2cfc54"
}
}
},
"subnetacl26": {
"Type": "AWS::EC2::SubnetNetworkAclAssociation",
"Properties": {
"NetworkAclId": {
"Ref": "aclbb2594de"
},
"SubnetId": {
"Ref": "subnet6dcf761a"
}
}
},
"subnetacl27": {
"Type": "AWS::EC2::SubnetNetworkAclAssociation",
"Properties": {
"NetworkAclId": {
"Ref": "acl882594ed"
},
"SubnetId": {
"Ref": "subnetefcf7698"
}
}
},
"subnetacl28": {
"Type": "AWS::EC2::SubnetNetworkAclAssociation",
"Properties": {
"NetworkAclId": {
"Ref": "acl882594ed"
},
"SubnetId": {
"Ref": "subnet8a2cfcd3"
}
}
},
"subnetacl29": {
"Type": "AWS::EC2::SubnetNetworkAclAssociation",
"Properties": {
"NetworkAclId": {
"Ref": "acl882594ed"
},
"SubnetId": {
"Ref": "subnetd6cf76a1"
}
}
},
"subnetacl30": {
"Type": "AWS::EC2::SubnetNetworkAclAssociation",
"Properties": {
"NetworkAclId": {
"Ref": "acl882594ed"
},
"SubnetId": {
"Ref": "subnet922cfccb"
}
}
},
"subnetacl31": {
"Type": "AWS::EC2::SubnetNetworkAclAssociation",
"Properties": {
"NetworkAclId": {
"Ref": "acl882594ed"
},
"SubnetId": {
"Ref": "subnet802cfcd9"
}
}
},
"subnetacl32": {
"Type": "AWS::EC2::SubnetNetworkAclAssociation",
"Properties": {
"NetworkAclId": {
"Ref": "acl882594ed"
},
"SubnetId": {
"Ref": "subnete6cf7691"
}
}
},
"gw4": {
"Type": "AWS::EC2::VPCGatewayAttachment",
"Properties": {
"VpcId": {
"Ref": "vpcf34de096"
},
"InternetGatewayId": {
"Ref": "igw4eb2722b"
}
}
},
"gw5": {
"Type": "AWS::EC2::VPCGatewayAttachment",
"Properties": {
"VpcId": {
"Ref": "vpcf84de09d"
},
"InternetGatewayId": {
"Ref": "igw4fb2722a"
}
}
},
"gw6": {
"Type": "AWS::EC2::VPCGatewayAttachment",
"Properties": {
"VpcId": {
"Ref": "vpcf54de090"
},
"InternetGatewayId": {
"Ref": "igw48b2722d"
}
}
},
"subnetroute18": {
"Type": "AWS::EC2::SubnetRouteTableAssociation",
"Properties": {
"RouteTableId": {
"Ref": "rtb1a7fcd7f"
},
"SubnetId": {
"Ref": "subnete6cf7691"
}
}
},
"subnetroute19": {
"Type": "AWS::EC2::SubnetRouteTableAssociation",
"Properties": {
"RouteTableId": {
"Ref": "rtb1a7fcd7f"
},
"SubnetId": {
"Ref": "subnet922cfccb"
}
}
},
"subnetroute20": {
"Type": "AWS::EC2::SubnetRouteTableAssociation",
"Properties": {
"RouteTableId": {
"Ref": "rtb807ecce5"
},
"SubnetId": {
"Ref": "subnet6dcf761a"
}
}
},
"subnetroute21": {
"Type": "AWS::EC2::SubnetRouteTableAssociation",
"Properties": {
"RouteTableId": {
"Ref": "rtb807ecce5"
},
"SubnetId": {
"Ref": "subnet0d2cfc54"
}
}
},
"subnetroute22": {
"Type": "AWS::EC2::SubnetRouteTableAssociation",
"Properties": {
"RouteTableId": {
"Ref": "rtb107fcd75"
},
"SubnetId": {
"Ref": "subnetfa2cfca3"
}
}
},
"subnetroute23": {
"Type": "AWS::EC2::SubnetRouteTableAssociation",
"Properties": {
"RouteTableId": {
"Ref": "rtb107fcd75"
},
"SubnetId": {
"Ref": "subnet10cf7667"
}
}
},
"subnetroute24": {
"Type": "AWS::EC2::SubnetRouteTableAssociation",
"Properties": {
"RouteTableId": {
"Ref": "rtbe87fcd8d"
},
"SubnetId": {
"Ref": "subnetf1cf7686"
}
}
},
"subnetroute25": {
"Type": "AWS::EC2::SubnetRouteTableAssociation",
"Properties": {
"RouteTableId": {
"Ref": "rtbe87fcd8d"
},
"SubnetId": {
"Ref": "subnet992cfcc0"
}
}
},
"subnetroute27": {
"Type": "AWS::EC2::SubnetRouteTableAssociation",
"Properties": {
"RouteTableId": {
"Ref": "rtbba7fcddf"
},
"SubnetId": {
"Ref": "subnetefcf7698"
}
}
},
"subnetroute28": {
"Type": "AWS::EC2::SubnetRouteTableAssociation",
"Properties": {
"RouteTableId": {
"Ref": "rtbba7fcddf"
},
"SubnetId": {
"Ref": "subnet8a2cfcd3"
}
}
},
"subnetroute30": {
"Type": "AWS::EC2::SubnetRouteTableAssociation",
"Properties": {
"RouteTableId": {
"Ref": "rtbe07fcd85"
},
"SubnetId": {
"Ref": "subnetd6cf76a1"
}
}
},
"subnetroute31": {
"Type": "AWS::EC2::SubnetRouteTableAssociation",
"Properties": {
"RouteTableId": {
"Ref": "rtbe07fcd85"
},
"SubnetId": {
"Ref": "subnet802cfcd9"
}
}
},
"subnetroute33": {
"Type": "AWS::EC2::SubnetRouteTableAssociation",
"Properties": {
"RouteTableId": {
"Ref": "rtb837fcde6"
},
"SubnetId": {
"Ref": "subnet06cf7671"
}
}
},
"subnetroute34": {
"Type": "AWS::EC2::SubnetRouteTableAssociation",
"Properties": {
"RouteTableId": {
"Ref": "rtb837fcde6"
},
"SubnetId": {
"Ref": "subnetf52cfcac"
}
}
},
"route7": {
"Type": "AWS::EC2::Route",
"Properties": {
"DestinationCidrBlock": "0.0.0.0/0",
"RouteTableId": {
"Ref": "rtb1a7fcd7f"
},
"GatewayId": {
"Ref": "igw4fb2722a"
}
},
"DependsOn": "gw5"
},
"route8": {
"Type": "AWS::EC2::Route",
"Properties": {
"DestinationCidrBlock": "0.0.0.0/0",
"RouteTableId": {
"Ref": "rtb807ecce5"
},
"GatewayId": {
"Ref": "igw48b2722d"
}
},
"DependsOn": "gw6"
},
"route9": {
"Type": "AWS::EC2::Route",
"Properties": {
"RouteTableId": {
"Ref": "rtb437cce26"
},
"GatewayId": "vpce-a8e403c1"
}
},
"route10": {
"Type": "AWS::EC2::Route",
"Properties": {
"DestinationCidrBlock": "0.0.0.0/0",
"RouteTableId": {
"Ref": "rtb107fcd75"
},
"GatewayId": {
"Ref": "igw4eb2722b"
}
},
"DependsOn": "gw4"
},
"route11": {
"Type": "AWS::EC2::Route",
"Properties": {
"RouteTableId": {
"Ref": "rtbba7fcddf"
},
"GatewayId": "vpce-d1e403b8"
}
},
"route12": {
"Type": "AWS::EC2::Route",
"Properties": {
"RouteTableId": {
"Ref": "rtb837fcde6"
},
"GatewayId": "vpce-dfe403b6"
}
},
"dchpassoc4": {
"Type": "AWS::EC2::VPCDHCPOptionsAssociation",
"Properties": {
"VpcId": {
"Ref": "vpcf84de09d"
},
"DhcpOptionsId": {
"Ref": "dopt6d3d360f"
}
}
},
"dchpassoc5": {
"Type": "AWS::EC2::VPCDHCPOptionsAssociation",
"Properties": {
"VpcId": {
"Ref": "vpcf54de090"
},
"DhcpOptionsId": {
"Ref": "dopt6d3d360f"
}
}
},
"dchpassoc6": {
"Type": "AWS::EC2::VPCDHCPOptionsAssociation",
"Properties": {
"VpcId": {
"Ref": "vpcf34de096"
},
"DhcpOptionsId": {
"Ref": "dopt6d3d360f"
}
}
},
"ingress13": {
"Type": "AWS::EC2::SecurityGroupIngress",
"Properties": {
"GroupId": {
"Ref": "sgdevelbsg"
},
"IpProtocol": "tcp",
"FromPort": "80",
"ToPort": "80",
"CidrIp": "0.0.0.0/0"
}
},
"ingress14": {
"Type": "AWS::EC2::SecurityGroupIngress",
"Properties": {
"GroupId": {
"Ref": "sgdevelbsg"
},
"IpProtocol": "tcp",
"FromPort": "443",
"ToPort": "443",
"CidrIp": "0.0.0.0/0"
}
},
"ingress15": {
"Type": "AWS::EC2::SecurityGroupIngress",
"Properties": {
"GroupId": {
"Ref": "sgstgelbsg"
},
"IpProtocol": "tcp",
"FromPort": "80",
"ToPort": "80",
"CidrIp": "0.0.0.0/0"
}
},
"ingress16": {
"Type": "AWS::EC2::SecurityGroupIngress",
"Properties": {
"GroupId": {
"Ref": "sgstgelbsg"
},
"IpProtocol": "tcp",
"FromPort": "443",
"ToPort": "443",
"CidrIp": "0.0.0.0/0"
}
},
"ingress17": {
"Type": "AWS::EC2::SecurityGroupIngress",
"Properties": {
"GroupId": {
"Ref": "sgprdelbsg"
},
"IpProtocol": "tcp",
"FromPort": "80",
"ToPort": "80",
"CidrIp": "0.0.0.0/0"
}
},
"ingress18": {
"Type": "AWS::EC2::SecurityGroupIngress",
"Properties": {
"GroupId": {
"Ref": "sgprdelbsg"
},
"IpProtocol": "tcp",
"FromPort": "443",
"ToPort": "443",
"CidrIp": "0.0.0.0/0"
}
},
"egress10": {
"Type": "AWS::EC2::SecurityGroupEgress",
"Properties": {
"GroupId": {
"Ref": "sgdevelbsg"
},
"IpProtocol": "-1",
"CidrIp": "0.0.0.0/0"
}
},
"egress11": {
"Type": "AWS::EC2::SecurityGroupEgress",
"Properties": {
"GroupId": {
"Ref": "sgstgelbsg"
},
"IpProtocol": "-1",
"CidrIp": "0.0.0.0/0"
}
},
"egress12": {
"Type": "AWS::EC2::SecurityGroupEgress",
"Properties": {
"GroupId": {
"Ref": "sgprdelbsg"
},
"IpProtocol": "-1",
"CidrIp": "0.0.0.0/0"
}
}
},
"Description": "開発・ステージング・本番それぞれの環境をVPC内に構築。またそれぞれの環境に合わせたセキュリティグループやELB、RDSサブネットグループを作成"
}
@Twinuma
Copy link
Author

Twinuma commented Jul 20, 2015

構成図.png

@Twinuma
Copy link
Author

Twinuma commented Jul 20, 2015

  • Internet Gatewayの線を追加

構成図.png

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment