Last active
September 17, 2019 18:19
-
-
Save oscarnevarezleal/fcdddbe3cf75ba9769a8ff1faee9290e to your computer and use it in GitHub Desktop.
This file contains hidden or 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", | |
| "Description": "", | |
| "Parameters": { | |
| "VPCCidrBlock": { | |
| "Description": "Select CIDR Block for VPC", | |
| "Type": "String", | |
| "Default": "10.0.0.0/16" | |
| }, | |
| "Subnet1Cidrblock": { | |
| "Description": "Choose Cidrblock for subnet1", | |
| "Type": "String" | |
| }, | |
| "Subnet2Cidrblock": { | |
| "Description": "Choose Cidrblock for subnet2", | |
| "Type": "String" | |
| }, | |
| "AZs": { | |
| "Description": "Choose AZ for Subnet1", | |
| "Type": "List<AWS::EC2::AvailabilityZone::Name>" | |
| } | |
| }, | |
| "Mappings": {}, | |
| "Conditions": {}, | |
| "Resources": { | |
| "MyVPC": { | |
| "Type": "AWS::EC2::VPC", | |
| "Properties": { | |
| "CidrBlock": { | |
| "Ref": "VPCCidrBlock" | |
| }, | |
| "Tags": [ | |
| { | |
| "Key": "Name", | |
| "Value": "VPCDemo" | |
| } | |
| ] | |
| }, | |
| "Metadata": { | |
| "AWS::CloudFormation::Designer": { | |
| "id": "17c51bef-0554-47aa-b99b-3ec5a8ef4899" | |
| } | |
| } | |
| }, | |
| "VpcInternetGA": { | |
| "Type": "AWS::EC2::VPCGatewayAttachment", | |
| "Properties": { | |
| "InternetGatewayId": { | |
| "Ref": "InternetGateway" | |
| }, | |
| "VpcId": { | |
| "Ref": "MyVPC" | |
| } | |
| }, | |
| "Metadata": { | |
| "AWS::CloudFormation::Designer": { | |
| "id": "eae51f4e-c965-44b5-9ea8-a617f10434b1" | |
| } | |
| } | |
| }, | |
| "InternetGateway": { | |
| "Type": "AWS::EC2::InternetGateway", | |
| "Properties": {}, | |
| "Metadata": { | |
| "AWS::CloudFormation::Designer": { | |
| "id": "e133d7a4-a29e-44db-ac26-e60b0dfd9d86" | |
| } | |
| } | |
| }, | |
| "Subnet1": { | |
| "Type": "AWS::EC2::Subnet", | |
| "Properties": { | |
| "AvailabilityZone": { | |
| "Fn::Select": [ | |
| "0", | |
| { | |
| "Ref": "AZs" | |
| } | |
| ] | |
| }, | |
| "VpcId": { | |
| "Ref": "MyVPC" | |
| }, | |
| "CidrBlock": { | |
| "Ref": "Subnet1Cidrblock" | |
| }, | |
| "Tags": [ | |
| { | |
| "Key": "Name", | |
| "Value": "Subnet1" | |
| } | |
| ] | |
| }, | |
| "Metadata": { | |
| "AWS::CloudFormation::Designer": { | |
| "id": "2a65c51a-b5f7-406d-bb8c-e7fd1e6cab0b" | |
| } | |
| } | |
| }, | |
| "Subnet2": { | |
| "Type": "AWS::EC2::Subnet", | |
| "Properties": { | |
| "AvailabilityZone": { | |
| "Fn::Select": [ | |
| "1", | |
| { | |
| "Ref": "AZs" | |
| } | |
| ] | |
| }, | |
| "VpcId": { | |
| "Ref": "MyVPC" | |
| }, | |
| "CidrBlock": { | |
| "Ref": "Subnet2Cidrblock" | |
| }, | |
| "Tags": [ | |
| { | |
| "Key": "Name", | |
| "Value": "Subnet2" | |
| } | |
| ] | |
| }, | |
| "Metadata": { | |
| "AWS::CloudFormation::Designer": { | |
| "id": "af35aae7-0722-4d7c-b7b0-c09e2b82da7f" | |
| } | |
| } | |
| }, | |
| "ASASG1EKV0": { | |
| "Type": "AWS::AutoScaling::AutoScalingGroup", | |
| "Properties": { | |
| "AvailabilityZones": { | |
| "Ref": "AZs" | |
| }, | |
| "VPCZoneIdentifier": [ | |
| { | |
| "Ref": "Subnet1" | |
| }, | |
| { | |
| "Ref": "Subnet2" | |
| } | |
| ], | |
| "LoadBalancerNames": [ | |
| { | |
| "Ref": "LB" | |
| } | |
| ], | |
| "LaunchConfigurationName": { | |
| "Ref": "ASLCDB74" | |
| }, | |
| "MinSize": "1", | |
| "MaxSize": "4" | |
| }, | |
| "Metadata": { | |
| "AWS::CloudFormation::Designer": { | |
| "id": "b6a4be98-3d46-40e0-bbcd-4013d621d397" | |
| } | |
| } | |
| }, | |
| "ASLCDB74": { | |
| "Type": "AWS::AutoScaling::LaunchConfiguration", | |
| "Properties": { | |
| "AssociatePublicIpAddress": false, | |
| "ImageId": "ami-0ff8a91507f77f867", | |
| "SecurityGroups": [ | |
| { | |
| "Ref": "EC2SG40YZQ" | |
| } | |
| ], | |
| "InstanceType": "t2.micro", | |
| "BlockDeviceMappings": [ | |
| { | |
| "DeviceName": "/dev/sdk", | |
| "Ebs": { | |
| "VolumeSize": "50" | |
| } | |
| }, | |
| { | |
| "DeviceName": "/dev/sdc", | |
| "VirtualName": "ephemeral0" | |
| } | |
| ] | |
| }, | |
| "Metadata": { | |
| "AWS::CloudFormation::Designer": { | |
| "id": "09d4ada1-4cab-4c75-ba9b-dbef198b984a" | |
| } | |
| }, | |
| "DependsOn": [ | |
| "MyVPC" | |
| ] | |
| }, | |
| "EC2SG40YZQ": { | |
| "Type": "AWS::EC2::SecurityGroup", | |
| "Properties": { | |
| "GroupDescription": "Allow http to client host", | |
| "VpcId": { | |
| "Ref": "MyVPC" | |
| }, | |
| "SecurityGroupIngress": [ | |
| { | |
| "IpProtocol": "tcp", | |
| "FromPort": 80, | |
| "ToPort": 80, | |
| "CidrIp": { | |
| "Ref": "VPCCidrBlock" | |
| } | |
| }, | |
| { | |
| "IpProtocol": "tcp", | |
| "FromPort": 80, | |
| "ToPort": 80, | |
| "CidrIp": { | |
| "Ref": "Subnet1Cidrblock" | |
| } | |
| }, | |
| { | |
| "IpProtocol": "tcp", | |
| "FromPort": 80, | |
| "ToPort": 80, | |
| "CidrIp": { | |
| "Ref": "Subnet2Cidrblock" | |
| } | |
| } | |
| ], | |
| "SecurityGroupEgress": [ | |
| { | |
| "IpProtocol": "tcp", | |
| "FromPort": 80, | |
| "ToPort": 80, | |
| "CidrIp": { | |
| "Ref": "VPCCidrBlock" | |
| } | |
| }, | |
| { | |
| "IpProtocol": "tcp", | |
| "FromPort": 80, | |
| "ToPort": 80, | |
| "CidrIp": { | |
| "Ref": "Subnet1Cidrblock" | |
| } | |
| }, | |
| { | |
| "IpProtocol": "tcp", | |
| "FromPort": 80, | |
| "ToPort": 80, | |
| "CidrIp": { | |
| "Ref": "Subnet2Cidrblock" | |
| } | |
| } | |
| ] | |
| }, | |
| "Metadata": { | |
| "AWS::CloudFormation::Designer": { | |
| "id": "c69a7c19-a808-4617-9389-ecf7c91ebdef" | |
| } | |
| } | |
| }, | |
| "LB": { | |
| "Type": "AWS::ElasticLoadBalancing::LoadBalancer", | |
| "Properties": { | |
| "Listeners": [ | |
| { | |
| "InstancePort": "80", | |
| "LoadBalancerPort": "80", | |
| "Protocol": "HTTP" | |
| } | |
| ], | |
| "Subnets": [ | |
| { | |
| "Ref": "Subnet1" | |
| }, | |
| { | |
| "Ref": "Subnet2" | |
| } | |
| ] | |
| }, | |
| "Metadata": { | |
| "AWS::CloudFormation::Designer": { | |
| "id": "0ad15bd6-0ee3-41ff-afb9-80d7275901bc" | |
| } | |
| } | |
| } | |
| }, | |
| "Outputs": {}, | |
| "Metadata": { | |
| "AWS::CloudFormation::Designer": { | |
| "17c51bef-0554-47aa-b99b-3ec5a8ef4899": { | |
| "size": { | |
| "width": 510, | |
| "height": 420 | |
| }, | |
| "position": { | |
| "x": 60, | |
| "y": 90 | |
| }, | |
| "z": 1, | |
| "embeds": [ | |
| "c69a7c19-a808-4617-9389-ecf7c91ebdef", | |
| "af35aae7-0722-4d7c-b7b0-c09e2b82da7f", | |
| "2a65c51a-b5f7-406d-bb8c-e7fd1e6cab0b" | |
| ] | |
| }, | |
| "c69a7c19-a808-4617-9389-ecf7c91ebdef": { | |
| "size": { | |
| "width": 60, | |
| "height": 60 | |
| }, | |
| "position": { | |
| "x": 90, | |
| "y": 360 | |
| }, | |
| "z": 2, | |
| "parent": "17c51bef-0554-47aa-b99b-3ec5a8ef4899", | |
| "embeds": [], | |
| "iscontainedinside": [ | |
| "17c51bef-0554-47aa-b99b-3ec5a8ef4899", | |
| "17c51bef-0554-47aa-b99b-3ec5a8ef4899", | |
| "17c51bef-0554-47aa-b99b-3ec5a8ef4899", | |
| "17c51bef-0554-47aa-b99b-3ec5a8ef4899", | |
| "17c51bef-0554-47aa-b99b-3ec5a8ef4899", | |
| "17c51bef-0554-47aa-b99b-3ec5a8ef4899", | |
| "17c51bef-0554-47aa-b99b-3ec5a8ef4899" | |
| ] | |
| }, | |
| "09d4ada1-4cab-4c75-ba9b-dbef198b984a": { | |
| "size": { | |
| "width": 60, | |
| "height": 60 | |
| }, | |
| "position": { | |
| "x": 60, | |
| "y": 570 | |
| }, | |
| "z": 1, | |
| "embeds": [], | |
| "isassociatedwith": [ | |
| "c69a7c19-a808-4617-9389-ecf7c91ebdef" | |
| ], | |
| "dependson": [ | |
| "17c51bef-0554-47aa-b99b-3ec5a8ef4899" | |
| ] | |
| }, | |
| "af35aae7-0722-4d7c-b7b0-c09e2b82da7f": { | |
| "size": { | |
| "width": 150, | |
| "height": 150 | |
| }, | |
| "position": { | |
| "x": 300, | |
| "y": 150 | |
| }, | |
| "z": 2, | |
| "parent": "17c51bef-0554-47aa-b99b-3ec5a8ef4899", | |
| "embeds": [], | |
| "iscontainedinside": [ | |
| "17c51bef-0554-47aa-b99b-3ec5a8ef4899", | |
| "17c51bef-0554-47aa-b99b-3ec5a8ef4899", | |
| "17c51bef-0554-47aa-b99b-3ec5a8ef4899", | |
| "17c51bef-0554-47aa-b99b-3ec5a8ef4899", | |
| "17c51bef-0554-47aa-b99b-3ec5a8ef4899", | |
| "17c51bef-0554-47aa-b99b-3ec5a8ef4899", | |
| "17c51bef-0554-47aa-b99b-3ec5a8ef4899" | |
| ] | |
| }, | |
| "2a65c51a-b5f7-406d-bb8c-e7fd1e6cab0b": { | |
| "size": { | |
| "width": 150, | |
| "height": 150 | |
| }, | |
| "position": { | |
| "x": 90, | |
| "y": 150 | |
| }, | |
| "z": 2, | |
| "parent": "17c51bef-0554-47aa-b99b-3ec5a8ef4899", | |
| "embeds": [], | |
| "iscontainedinside": [ | |
| "17c51bef-0554-47aa-b99b-3ec5a8ef4899", | |
| "17c51bef-0554-47aa-b99b-3ec5a8ef4899", | |
| "17c51bef-0554-47aa-b99b-3ec5a8ef4899", | |
| "17c51bef-0554-47aa-b99b-3ec5a8ef4899", | |
| "17c51bef-0554-47aa-b99b-3ec5a8ef4899", | |
| "17c51bef-0554-47aa-b99b-3ec5a8ef4899", | |
| "17c51bef-0554-47aa-b99b-3ec5a8ef4899" | |
| ] | |
| }, | |
| "0ad15bd6-0ee3-41ff-afb9-80d7275901bc": { | |
| "size": { | |
| "width": 60, | |
| "height": 60 | |
| }, | |
| "position": { | |
| "x": 180, | |
| "y": 570 | |
| }, | |
| "z": 1, | |
| "embeds": [], | |
| "iscontainedinside": [ | |
| "2a65c51a-b5f7-406d-bb8c-e7fd1e6cab0b", | |
| "af35aae7-0722-4d7c-b7b0-c09e2b82da7f" | |
| ] | |
| }, | |
| "b6a4be98-3d46-40e0-bbcd-4013d621d397": { | |
| "size": { | |
| "width": 60, | |
| "height": 60 | |
| }, | |
| "position": { | |
| "x": 300, | |
| "y": 570 | |
| }, | |
| "z": 1, | |
| "embeds": [], | |
| "isassociatedwith": [ | |
| "09d4ada1-4cab-4c75-ba9b-dbef198b984a", | |
| "0ad15bd6-0ee3-41ff-afb9-80d7275901bc" | |
| ], | |
| "iscontainedinside": [ | |
| "2a65c51a-b5f7-406d-bb8c-e7fd1e6cab0b", | |
| "af35aae7-0722-4d7c-b7b0-c09e2b82da7f" | |
| ] | |
| }, | |
| "e133d7a4-a29e-44db-ac26-e60b0dfd9d86": { | |
| "size": { | |
| "width": 60, | |
| "height": 60 | |
| }, | |
| "position": { | |
| "x": 600, | |
| "y": 90 | |
| }, | |
| "z": 1, | |
| "embeds": [] | |
| }, | |
| "eae51f4e-c965-44b5-9ea8-a617f10434b1": { | |
| "source": { | |
| "id": "17c51bef-0554-47aa-b99b-3ec5a8ef4899" | |
| }, | |
| "target": { | |
| "id": "e133d7a4-a29e-44db-ac26-e60b0dfd9d86" | |
| }, | |
| "z": 1 | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment