Created
June 16, 2016 10:20
-
-
Save AbeIka/65814f2a68a198d7f8c1efa43952fe6e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Metadata": { | |
"AWS::CloudFormation::Designer": { | |
"388fb0c1-901e-4ad4-ac3d-e8363096f939": { | |
"size": { | |
"width": 960, | |
"height": 760 | |
}, | |
"position": { | |
"x": 320, | |
"y": 60 | |
}, | |
"z": 1, | |
"embeds": [ | |
"47487680-bffa-4a36-8d2b-71a5ef7e2856", | |
"ef00478d-1ba7-4f07-85b1-b061f629063f", | |
"93f6244b-89f1-414b-a9b2-7ccb39495b99", | |
"ec3d0bd6-0c06-4f67-90dd-19b7c8ff1dc3", | |
"576f0f63-116e-4ae3-ba5e-1de5da5c5abd", | |
"6223770a-42d9-4998-8d93-ac71e310fde4", | |
"90d8149f-f194-4f4e-929d-e17d380ea39f", | |
"1676ee4d-32ab-496b-bb67-8401e14993cb", | |
"1d27bf58-3229-486c-8d63-b07c800057fe", | |
"32a2a745-61b3-4381-bb1f-4cbcd5704ecc" | |
] | |
}, | |
"e2d75556-b131-4d56-a085-caa559383461": { | |
"size": { | |
"width": 60, | |
"height": 60 | |
}, | |
"position": { | |
"x": 250, | |
"y": 290 | |
}, | |
"z": 0, | |
"embeds": [] | |
}, | |
"738701d9-c112-49b9-9948-1cc587be6d00": { | |
"source": { | |
"id": "e2d75556-b131-4d56-a085-caa559383461" | |
}, | |
"target": { | |
"id": "388fb0c1-901e-4ad4-ac3d-e8363096f939" | |
}, | |
"z": 0 | |
}, | |
"32a2a745-61b3-4381-bb1f-4cbcd5704ecc": { | |
"size": { | |
"width": 220, | |
"height": 120 | |
}, | |
"position": { | |
"x": 330, | |
"y": 370 | |
}, | |
"z": 2, | |
"parent": "388fb0c1-901e-4ad4-ac3d-e8363096f939", | |
"embeds": [ | |
"723a5883-5986-4385-adc5-219ffe7fa7a2" | |
] | |
}, | |
"723a5883-5986-4385-adc5-219ffe7fa7a2": { | |
"size": { | |
"width": 60, | |
"height": 60 | |
}, | |
"position": { | |
"x": 410, | |
"y": 390 | |
}, | |
"z": 3, | |
"parent": "32a2a745-61b3-4381-bb1f-4cbcd5704ecc", | |
"embeds": [], | |
"references": [ | |
"e2d75556-b131-4d56-a085-caa559383461" | |
] | |
}, | |
"282b85ae-cbef-4b88-907c-9e063e8d52d7": { | |
"source": { | |
"id": "09f392f1-380e-4524-aed6-ad19a59bef26" | |
}, | |
"target": { | |
"id": "2943e3bb-632c-4f2c-a140-785ea8c4760f" | |
}, | |
"z": 4 | |
}, | |
"54c82885-f616-457c-ab45-4fd73ed63e4b": { | |
"source": { | |
"id": "f20ad126-5db3-4ffc-a031-6f58446bf51c" | |
}, | |
"target": { | |
"id": "68688e43-4b38-4415-aaf0-e0e1bd694040" | |
}, | |
"z": 11 | |
}, | |
"6ab69520-39ad-46ca-b49e-d2ecb6e68635": { | |
"source": { | |
"id": "f20ad126-5db3-4ffc-a031-6f58446bf51c" | |
}, | |
"target": { | |
"id": "7764c654-88b4-4b93-8fe5-def90fc5a904" | |
}, | |
"z": 11 | |
}, | |
"7e20a2ee-54e2-4a4f-84d7-0f398a721632": { | |
"source": { | |
"id": "2607f83c-8d44-4294-bc04-5862588685a2" | |
}, | |
"target": { | |
"id": "a89cf7e1-544a-4967-b7e6-9eaeab7f9d61" | |
}, | |
"z": 15 | |
}, | |
"40e51073-92d8-4f27-8260-df2d1923aad0": { | |
"source": { | |
"id": "2607f83c-8d44-4294-bc04-5862588685a2" | |
}, | |
"target": { | |
"id": "69a2a805-2357-49ad-b560-14fee4672e4d" | |
}, | |
"z": 11 | |
}, | |
"6aecf0e0-69c0-4560-9a84-d903163d7b6d": { | |
"source": { | |
"id": "52548cf6-e737-4f46-9820-95e16f4d5cb2" | |
}, | |
"target": { | |
"id": "69a2a805-2357-49ad-b560-14fee4672e4d" | |
}, | |
"z": 11 | |
}, | |
"99cb3ba7-4152-44be-a465-1453dd0ad466": { | |
"source": { | |
"id": "e971b299-a5b5-486e-875e-ac9f85249994" | |
}, | |
"target": { | |
"id": "6ccfb2b3-0777-42db-a7cd-693831b56acf" | |
}, | |
"z": 11 | |
}, | |
"b6e4cdee-2b84-4ad5-bf59-d661b427ff16": { | |
"source": { | |
"id": "32a2a745-61b3-4381-bb1f-4cbcd5704ecc" | |
}, | |
"target": { | |
"id": "9320241a-76ba-4e1d-a384-318d5190f763" | |
}, | |
"z": 2 | |
}, | |
"34bb243d-2b25-4787-8696-587ad5842c50": { | |
"size": { | |
"width": 180, | |
"height": 250 | |
}, | |
"position": { | |
"x": 550, | |
"y": 540 | |
}, | |
"z": 0, | |
"parent": "388fb0c1-901e-4ad4-ac3d-e8363096f939", | |
"embeds": [] | |
}, | |
"90d8149f-f194-4f4e-929d-e17d380ea39f": { | |
"size": { | |
"width": 180, | |
"height": 220 | |
}, | |
"position": { | |
"x": 530, | |
"y": 520 | |
}, | |
"z": 2, | |
"parent": "388fb0c1-901e-4ad4-ac3d-e8363096f939", | |
"embeds": [ | |
"76e29ae0-bb09-49da-8c5d-00e55e384e9c" | |
] | |
}, | |
"485f0c48-d110-4680-a742-4f6d82019317": { | |
"source": { | |
"id": "32a2a745-61b3-4381-bb1f-4cbcd5704ecc" | |
}, | |
"target": { | |
"id": "90d8149f-f194-4f4e-929d-e17d380ea39f" | |
}, | |
"z": 2 | |
}, | |
"1676ee4d-32ab-496b-bb67-8401e14993cb": { | |
"size": { | |
"width": 170, | |
"height": 220 | |
}, | |
"position": { | |
"x": 950, | |
"y": 510 | |
}, | |
"z": 2, | |
"parent": "388fb0c1-901e-4ad4-ac3d-e8363096f939", | |
"embeds": [ | |
"82111bde-8fa0-4234-9bf4-265bf94b299f" | |
] | |
}, | |
"7806222e-679b-420c-9ad2-f41c322016d4": { | |
"source": { | |
"id": "464dd676-1ad6-4389-8d1e-8ffb5b3c6ef8" | |
}, | |
"target": { | |
"id": "0da111d2-f8db-4a54-aea4-76e84faf2c34" | |
}, | |
"z": 2 | |
}, | |
"0660f184-8cc3-4d6e-a7f1-7b3d8f098033": { | |
"source": { | |
"id": "32a2a745-61b3-4381-bb1f-4cbcd5704ecc" | |
}, | |
"target": { | |
"id": "90d8149f-f194-4f4e-929d-e17d380ea39f" | |
}, | |
"z": 2 | |
}, | |
"a31a1a20-9138-4ced-a67d-f3ee2d45309f": { | |
"source": { | |
"id": "32a2a745-61b3-4381-bb1f-4cbcd5704ecc" | |
}, | |
"target": { | |
"id": "1676ee4d-32ab-496b-bb67-8401e14993cb" | |
}, | |
"z": 2 | |
}, | |
"576f0f63-116e-4ae3-ba5e-1de5da5c5abd": { | |
"size": { | |
"width": 170, | |
"height": 150 | |
}, | |
"position": { | |
"x": 560, | |
"y": 230 | |
}, | |
"z": 2, | |
"parent": "388fb0c1-901e-4ad4-ac3d-e8363096f939", | |
"embeds": [] | |
}, | |
"9f50f0c5-3fb1-4b78-98df-019a2be0fe6b": { | |
"source": { | |
"id": "32a2a745-61b3-4381-bb1f-4cbcd5704ecc" | |
}, | |
"target": { | |
"id": "576f0f63-116e-4ae3-ba5e-1de5da5c5abd" | |
}, | |
"z": 2 | |
}, | |
"ec3d0bd6-0c06-4f67-90dd-19b7c8ff1dc3": { | |
"size": { | |
"width": 180, | |
"height": 150 | |
}, | |
"position": { | |
"x": 950, | |
"y": 230 | |
}, | |
"z": 2, | |
"parent": "388fb0c1-901e-4ad4-ac3d-e8363096f939", | |
"embeds": [] | |
}, | |
"05844b07-b74c-414a-9b17-37a8d7545b85": { | |
"source": { | |
"id": "32a2a745-61b3-4381-bb1f-4cbcd5704ecc" | |
}, | |
"target": { | |
"id": "ec3d0bd6-0c06-4f67-90dd-19b7c8ff1dc3" | |
}, | |
"z": 2 | |
}, | |
"76e29ae0-bb09-49da-8c5d-00e55e384e9c": { | |
"size": { | |
"width": 60, | |
"height": 60 | |
}, | |
"position": { | |
"x": 590, | |
"y": 580 | |
}, | |
"z": 3, | |
"parent": "90d8149f-f194-4f4e-929d-e17d380ea39f", | |
"embeds": [], | |
"ismemberof": [ | |
"93f6244b-89f1-414b-a9b2-7ccb39495b99" | |
] | |
}, | |
"82111bde-8fa0-4234-9bf4-265bf94b299f": { | |
"size": { | |
"width": 60, | |
"height": 60 | |
}, | |
"position": { | |
"x": 1010, | |
"y": 580 | |
}, | |
"z": 3, | |
"parent": "1676ee4d-32ab-496b-bb67-8401e14993cb", | |
"embeds": [], | |
"ismemberof": [ | |
"93f6244b-89f1-414b-a9b2-7ccb39495b99" | |
] | |
}, | |
"93f6244b-89f1-414b-a9b2-7ccb39495b99": { | |
"size": { | |
"width": 60, | |
"height": 60 | |
}, | |
"position": { | |
"x": 780, | |
"y": 580 | |
}, | |
"z": 2, | |
"parent": "388fb0c1-901e-4ad4-ac3d-e8363096f939", | |
"embeds": [], | |
"isrelatedto": [ | |
"ef00478d-1ba7-4f07-85b1-b061f629063f" | |
] | |
}, | |
"dff699c3-170f-470b-9568-18c0db30600d": { | |
"source": { | |
"id": "82111bde-8fa0-4234-9bf4-265bf94b299f" | |
}, | |
"target": { | |
"id": "93f6244b-89f1-414b-a9b2-7ccb39495b99" | |
}, | |
"z": 4 | |
}, | |
"ef00478d-1ba7-4f07-85b1-b061f629063f": { | |
"size": { | |
"width": 60, | |
"height": 60 | |
}, | |
"position": { | |
"x": 1190, | |
"y": 670 | |
}, | |
"z": 2, | |
"parent": "388fb0c1-901e-4ad4-ac3d-e8363096f939", | |
"embeds": [], | |
"isrelatedto": [ | |
"47487680-bffa-4a36-8d2b-71a5ef7e2856" | |
] | |
}, | |
"1d27bf58-3229-486c-8d63-b07c800057fe": { | |
"size": { | |
"width": 60, | |
"height": 60 | |
}, | |
"position": { | |
"x": 780, | |
"y": 440 | |
}, | |
"z": 2, | |
"parent": "388fb0c1-901e-4ad4-ac3d-e8363096f939", | |
"embeds": [], | |
"isconnectedto": [ | |
"76e29ae0-bb09-49da-8c5d-00e55e384e9c", | |
"82111bde-8fa0-4234-9bf4-265bf94b299f", | |
"90d8149f-f194-4f4e-929d-e17d380ea39f", | |
"1676ee4d-32ab-496b-bb67-8401e14993cb" | |
], | |
"ismemberof": [ | |
"ef00478d-1ba7-4f07-85b1-b061f629063f" | |
] | |
}, | |
"26de5361-b6a2-4713-81c8-82c2bd4efb43": { | |
"source": { | |
"id": "1d27bf58-3229-486c-8d63-b07c800057fe" | |
}, | |
"target": { | |
"id": "ef00478d-1ba7-4f07-85b1-b061f629063f" | |
}, | |
"z": 4 | |
}, | |
"29c4ed16-fe9c-4e9e-b03c-ab0e4593c827": { | |
"source": { | |
"id": "1d27bf58-3229-486c-8d63-b07c800057fe" | |
}, | |
"target": { | |
"id": "ef00478d-1ba7-4f07-85b1-b061f629063f" | |
}, | |
"z": 4 | |
}, | |
"63598e5c-13e7-43f3-ab9a-df2680ea1cc2": { | |
"source": { | |
"id": "1d27bf58-3229-486c-8d63-b07c800057fe" | |
}, | |
"target": { | |
"id": "90d8149f-f194-4f4e-929d-e17d380ea39f" | |
}, | |
"z": 4 | |
}, | |
"fde56a58-29c0-448e-ab5d-2767b9ef7460": { | |
"source": { | |
"id": "1d27bf58-3229-486c-8d63-b07c800057fe" | |
}, | |
"target": { | |
"id": "1676ee4d-32ab-496b-bb67-8401e14993cb" | |
}, | |
"z": 5 | |
}, | |
"6223770a-42d9-4998-8d93-ac71e310fde4": { | |
"size": { | |
"width": 60, | |
"height": 60 | |
}, | |
"position": { | |
"x": 800, | |
"y": 170 | |
}, | |
"z": 2, | |
"parent": "388fb0c1-901e-4ad4-ac3d-e8363096f939", | |
"embeds": [], | |
"isconnectedto": [ | |
"576f0f63-116e-4ae3-ba5e-1de5da5c5abd", | |
"ec3d0bd6-0c06-4f67-90dd-19b7c8ff1dc3" | |
], | |
"ismemberof": [ | |
"47487680-bffa-4a36-8d2b-71a5ef7e2856" | |
] | |
}, | |
"5907dcbf-3973-40dc-967d-b07a86529cb4": { | |
"source": { | |
"id": "6223770a-42d9-4998-8d93-ac71e310fde4" | |
}, | |
"target": { | |
"id": "576f0f63-116e-4ae3-ba5e-1de5da5c5abd" | |
}, | |
"z": 4 | |
}, | |
"b43a0c18-fd7f-455d-9565-b4db5939bbe8": { | |
"source": { | |
"id": "6223770a-42d9-4998-8d93-ac71e310fde4" | |
}, | |
"target": { | |
"id": "ec3d0bd6-0c06-4f67-90dd-19b7c8ff1dc3" | |
}, | |
"z": 5 | |
}, | |
"47487680-bffa-4a36-8d2b-71a5ef7e2856": { | |
"size": { | |
"width": 60, | |
"height": 60 | |
}, | |
"position": { | |
"x": 1190, | |
"y": 290 | |
}, | |
"z": 2, | |
"parent": "388fb0c1-901e-4ad4-ac3d-e8363096f939", | |
"embeds": [] | |
} | |
} | |
}, | |
"Resources": { | |
"InternetGateway": { | |
"Type": "AWS::EC2::InternetGateway", | |
"Properties": { | |
"Tags": [ | |
{ | |
"Key": "Name", | |
"Value": "IGW" | |
} | |
] | |
}, | |
"Metadata": { | |
"AWS::CloudFormation::Designer": { | |
"id": "e2d75556-b131-4d56-a085-caa559383461" | |
} | |
} | |
}, | |
"VPCGatewayAttachment": { | |
"Type": "AWS::EC2::VPCGatewayAttachment", | |
"Properties": { | |
"InternetGatewayId": { | |
"Ref": "InternetGateway" | |
}, | |
"VpcId": { | |
"Ref": "VPC" | |
} | |
}, | |
"Metadata": { | |
"AWS::CloudFormation::Designer": { | |
"id": "738701d9-c112-49b9-9948-1cc587be6d00" | |
} | |
} | |
}, | |
"VPC": { | |
"Type": "AWS::EC2::VPC", | |
"Properties": { | |
"CidrBlock": { | |
"Fn::FindInMap": [ | |
"StackConfig", | |
"CIDR", | |
"VPC" | |
] | |
}, | |
"EnableDnsSupport": true, | |
"EnableDnsHostnames": true, | |
"InstanceTenancy": "default", | |
"Tags": [ | |
{ | |
"Key": "Name", | |
"Value": "VPC" | |
} | |
] | |
}, | |
"Metadata": { | |
"AWS::CloudFormation::Designer": { | |
"id": "388fb0c1-901e-4ad4-ac3d-e8363096f939" | |
} | |
} | |
}, | |
"Route": { | |
"Type": "AWS::EC2::RouteTable", | |
"Properties": { | |
"VpcId": { | |
"Ref": "VPC" | |
}, | |
"Tags": [ | |
{ | |
"Key": "Name", | |
"Value": "Route" | |
} | |
] | |
}, | |
"Metadata": { | |
"AWS::CloudFormation::Designer": { | |
"id": "32a2a745-61b3-4381-bb1f-4cbcd5704ecc" | |
} | |
} | |
}, | |
"PublicRoute": { | |
"Type": "AWS::EC2::Route", | |
"Properties": { | |
"GatewayId": { | |
"Ref": "InternetGateway" | |
}, | |
"DestinationCidrBlock": "0.0.0.0/0", | |
"RouteTableId": { | |
"Ref": "Route" | |
} | |
}, | |
"Metadata": { | |
"AWS::CloudFormation::Designer": { | |
"id": "723a5883-5986-4385-adc5-219ffe7fa7a2" | |
} | |
} | |
}, | |
"Web1c": { | |
"Type": "AWS::EC2::Subnet", | |
"Properties": { | |
"AvailabilityZone": { | |
"Fn::Select": [ | |
"1", | |
{ | |
"Fn::GetAZs": { | |
"Ref": "AWS::Region" | |
} | |
} | |
] | |
}, | |
"CidrBlock": { | |
"Fn::FindInMap": [ | |
"StackConfig", | |
"CIDR", | |
"Web1c" | |
] | |
}, | |
"MapPublicIpOnLaunch": true, | |
"Tags": [ | |
{ | |
"Key": "Name", | |
"Value": "Web1c" | |
} | |
], | |
"VpcId": { | |
"Ref": "VPC" | |
} | |
}, | |
"Metadata": { | |
"AWS::CloudFormation::Designer": { | |
"id": "1676ee4d-32ab-496b-bb67-8401e14993cb" | |
} | |
} | |
}, | |
"Web1a": { | |
"Type": "AWS::EC2::Subnet", | |
"Properties": { | |
"AvailabilityZone": { | |
"Fn::Select": [ | |
"0", | |
{ | |
"Fn::GetAZs": { | |
"Ref": "AWS::Region" | |
} | |
} | |
] | |
}, | |
"CidrBlock": { | |
"Fn::FindInMap": [ | |
"StackConfig", | |
"CIDR", | |
"Web1a" | |
] | |
}, | |
"MapPublicIpOnLaunch": true, | |
"Tags": [ | |
{ | |
"Key": "Name", | |
"Value": "Web1a" | |
} | |
], | |
"VpcId": { | |
"Ref": "VPC" | |
} | |
}, | |
"Metadata": { | |
"AWS::CloudFormation::Designer": { | |
"id": "90d8149f-f194-4f4e-929d-e17d380ea39f" | |
} | |
} | |
}, | |
"EC2SRTA4ID0P": { | |
"Type": "AWS::EC2::SubnetRouteTableAssociation", | |
"Properties": { | |
"RouteTableId": { | |
"Ref": "Route" | |
}, | |
"SubnetId": { | |
"Ref": "Web1a" | |
} | |
}, | |
"Metadata": { | |
"AWS::CloudFormation::Designer": { | |
"id": "0660f184-8cc3-4d6e-a7f1-7b3d8f098033" | |
} | |
} | |
}, | |
"EC2SRTABYRB": { | |
"Type": "AWS::EC2::SubnetRouteTableAssociation", | |
"Properties": { | |
"RouteTableId": { | |
"Ref": "Route" | |
}, | |
"SubnetId": { | |
"Ref": "Web1c" | |
} | |
}, | |
"Metadata": { | |
"AWS::CloudFormation::Designer": { | |
"id": "a31a1a20-9138-4ced-a67d-f3ee2d45309f" | |
} | |
} | |
}, | |
"WAF1a": { | |
"Type": "AWS::EC2::Subnet", | |
"Properties": { | |
"AvailabilityZone": { | |
"Fn::Select": [ | |
"0", | |
{ | |
"Fn::GetAZs": { | |
"Ref": "AWS::Region" | |
} | |
} | |
] | |
}, | |
"CidrBlock": { | |
"Fn::FindInMap": [ | |
"StackConfig", | |
"CIDR", | |
"WAF1a" | |
] | |
}, | |
"MapPublicIpOnLaunch": true, | |
"Tags": [ | |
{ | |
"Key": "Name", | |
"Value": "WAF1a" | |
} | |
], | |
"VpcId": { | |
"Ref": "VPC" | |
} | |
}, | |
"Metadata": { | |
"AWS::CloudFormation::Designer": { | |
"id": "576f0f63-116e-4ae3-ba5e-1de5da5c5abd" | |
} | |
} | |
}, | |
"EC2SRTA2FH2N": { | |
"Type": "AWS::EC2::SubnetRouteTableAssociation", | |
"Properties": { | |
"RouteTableId": { | |
"Ref": "Route" | |
}, | |
"SubnetId": { | |
"Ref": "WAF1a" | |
} | |
}, | |
"Metadata": { | |
"AWS::CloudFormation::Designer": { | |
"id": "9f50f0c5-3fb1-4b78-98df-019a2be0fe6b" | |
} | |
} | |
}, | |
"WAF1c": { | |
"Type": "AWS::EC2::Subnet", | |
"Properties": { | |
"AvailabilityZone": { | |
"Fn::Select": [ | |
"1", | |
{ | |
"Fn::GetAZs": { | |
"Ref": "AWS::Region" | |
} | |
} | |
] | |
}, | |
"CidrBlock": { | |
"Fn::FindInMap": [ | |
"StackConfig", | |
"CIDR", | |
"WAF1c" | |
] | |
}, | |
"MapPublicIpOnLaunch": true, | |
"Tags": [ | |
{ | |
"Key": "Name", | |
"Value": "WAF1c" | |
} | |
], | |
"VpcId": { | |
"Ref": "VPC" | |
} | |
}, | |
"Metadata": { | |
"AWS::CloudFormation::Designer": { | |
"id": "ec3d0bd6-0c06-4f67-90dd-19b7c8ff1dc3" | |
} | |
} | |
}, | |
"EC2SRTA3888K": { | |
"Type": "AWS::EC2::SubnetRouteTableAssociation", | |
"Properties": { | |
"RouteTableId": { | |
"Ref": "Route" | |
}, | |
"SubnetId": { | |
"Ref": "WAF1c" | |
} | |
}, | |
"Metadata": { | |
"AWS::CloudFormation::Designer": { | |
"id": "05844b07-b74c-414a-9b17-37a8d7545b85" | |
} | |
} | |
}, | |
"WebServer1": { | |
"Type": "AWS::EC2::Instance", | |
"Properties": { | |
"BlockDeviceMappings": [ | |
{ | |
"DeviceName": "/dev/xvda", | |
"Ebs": { | |
"VolumeSize": "30", | |
"VolumeType": "gp2" | |
} | |
} | |
], | |
"ImageId": { | |
"Ref": "WebServerImageId" | |
}, | |
"KeyName": { | |
"Ref": "EC2KeyName" | |
}, | |
"SecurityGroupIds": [ | |
{ | |
"Ref": "SgWebServer" | |
} | |
], | |
"SubnetId": { | |
"Ref": "Web1a" | |
}, | |
"InstanceType": "t2.micro", | |
"Tags": [ | |
{ | |
"Key": "Name", | |
"Value": "WebServer1" | |
} | |
] | |
}, | |
"Metadata": { | |
"AWS::CloudFormation::Designer": { | |
"id": "76e29ae0-bb09-49da-8c5d-00e55e384e9c" | |
} | |
} | |
}, | |
"WebServer2": { | |
"Type": "AWS::EC2::Instance", | |
"Properties": { | |
"BlockDeviceMappings": [ | |
{ | |
"DeviceName": "/dev/xvda", | |
"Ebs": { | |
"VolumeSize": "30", | |
"VolumeType": "gp2" | |
} | |
} | |
], | |
"ImageId": { | |
"Ref": "WebServerImageId" | |
}, | |
"KeyName": { | |
"Ref": "EC2KeyName" | |
}, | |
"SecurityGroupIds": [ | |
{ | |
"Ref": "SgWebServer" | |
} | |
], | |
"SubnetId": { | |
"Ref": "Web1c" | |
}, | |
"InstanceType": "t2.micro", | |
"Tags": [ | |
{ | |
"Key": "Name", | |
"Value": "WebServer2" | |
} | |
] | |
}, | |
"Metadata": { | |
"AWS::CloudFormation::Designer": { | |
"id": "82111bde-8fa0-4234-9bf4-265bf94b299f" | |
} | |
} | |
}, | |
"SgWebServer": { | |
"Type": "AWS::EC2::SecurityGroup", | |
"Metadata": { | |
"AWS::CloudFormation::Designer": { | |
"id": "93f6244b-89f1-414b-a9b2-7ccb39495b99" | |
} | |
}, | |
"Properties": { | |
"GroupDescription": "Security Group for WebServer", | |
"SecurityGroupIngress": [ | |
{ | |
"CidrIp": { | |
"Ref": "MaintenanceIP" | |
}, | |
"FromPort": 22, | |
"IpProtocol": "tcp", | |
"ToPort": 22 | |
}, | |
{ | |
"SourceSecurityGroupId": { | |
"Ref": "SgWebELB" | |
}, | |
"FromPort": 80, | |
"IpProtocol": "tcp", | |
"ToPort": 80 | |
} | |
], | |
"Tags": [ | |
{ | |
"Key": "Name", | |
"Value": "SgWebServer" | |
} | |
], | |
"VpcId": { | |
"Ref": "VPC" | |
} | |
} | |
}, | |
"SgWebELB": { | |
"Type": "AWS::EC2::SecurityGroup", | |
"Properties": { | |
"GroupDescription": "Security Group for WebServer", | |
"SecurityGroupIngress": [ | |
{ | |
"CidrIp": "0.0.0.0/0", | |
"FromPort": 80, | |
"IpProtocol": "tcp", | |
"ToPort": 80 | |
} | |
], | |
"Tags": [ | |
{ | |
"Key": "Name", | |
"Value": "SgWebELB" | |
} | |
], | |
"VpcId": { | |
"Ref": "VPC" | |
} | |
}, | |
"Metadata": { | |
"AWS::CloudFormation::Designer": { | |
"id": "ef00478d-1ba7-4f07-85b1-b061f629063f" | |
} | |
} | |
}, | |
"ELBWAF": { | |
"Type": "AWS::ElasticLoadBalancing::LoadBalancer", | |
"Properties": { | |
"LoadBalancerName": "ELBWAF", | |
"CrossZone": true, | |
"Subnets": [ | |
{ | |
"Ref": "WAF1a" | |
}, | |
{ | |
"Ref": "WAF1c" | |
} | |
], | |
"Tags": [ | |
{ | |
"Key": "Name", | |
"Value": "ELBWAF" | |
} | |
], | |
"SecurityGroups": [ | |
{ | |
"Ref": "SgWAFELB" | |
} | |
], | |
"Listeners": [ | |
{ | |
"LoadBalancerPort": "80", | |
"InstancePort": "80", | |
"Protocol": "TCP", | |
"InstanceProtocol": "TCP" | |
} | |
] | |
}, | |
"Metadata": { | |
"AWS::CloudFormation::Designer": { | |
"id": "6223770a-42d9-4998-8d93-ac71e310fde4" | |
} | |
} | |
}, | |
"SgWAFELB": { | |
"Type": "AWS::EC2::SecurityGroup", | |
"Properties": { | |
"GroupDescription": "Security Group for WebServer", | |
"SecurityGroupIngress": [ | |
{ | |
"CidrIp": "0.0.0.0/0", | |
"FromPort": 80, | |
"IpProtocol": "tcp", | |
"ToPort": 80 | |
} | |
], | |
"Tags": [ | |
{ | |
"Key": "Name", | |
"Value": "SgWAFELB" | |
} | |
], | |
"VpcId": { | |
"Ref": "VPC" | |
} | |
}, | |
"Metadata": { | |
"AWS::CloudFormation::Designer": { | |
"id": "47487680-bffa-4a36-8d2b-71a5ef7e2856" | |
} | |
} | |
}, | |
"InELBWebServer": { | |
"Type": "AWS::ElasticLoadBalancing::LoadBalancer", | |
"Properties": { | |
"Scheme": "internal", | |
"LoadBalancerName": "ELBWebServer", | |
"CrossZone": true, | |
"Instances": [ | |
{ | |
"Ref": "WebServer1" | |
}, | |
{ | |
"Ref": "WebServer2" | |
} | |
], | |
"Tags": [ | |
{ | |
"Key": "Name", | |
"Value": "ELBWebServer" | |
} | |
], | |
"SecurityGroups": [ | |
{ | |
"Ref": "SgWebELB" | |
} | |
], | |
"Subnets": [ | |
{ | |
"Ref": "Web1a" | |
}, | |
{ | |
"Ref": "Web1c" | |
} | |
], | |
"Listeners": [ | |
{ | |
"LoadBalancerPort": "80", | |
"InstancePort": "80", | |
"Protocol": "TCP", | |
"InstanceProtocol": "TCP" | |
} | |
] | |
}, | |
"Metadata": { | |
"AWS::CloudFormation::Designer": { | |
"id": "1d27bf58-3229-486c-8d63-b07c800057fe" | |
} | |
} | |
} | |
}, | |
"Parameters": { | |
"EC2KeyName": { | |
"Description": "", | |
"Type": "AWS::EC2::KeyPair::KeyName" | |
}, | |
"WebServerImageId": { | |
"Description": "", | |
"Type": "AWS::EC2::Image::Id" | |
}, | |
"MaintenanceIP": { | |
"Description": "Permit SSH IP Address.xxx.xxx.xxx.xxx/xx", | |
"Type": "String" | |
} | |
}, | |
"Outputs": {}, | |
"Mappings": { | |
"StackConfig": { | |
"CIDR": { | |
"VPC": "192.168.2.0/24", | |
"WAF1a": "192.168.2.0/26", | |
"WAF1c": "192.168.2.64/26", | |
"Web1a": "192.168.2.128/26", | |
"Web1c": "192.168.2.192/26" | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment