Create/Delete Stack
1 2 3 4 5 6 7 8
| aws cloudformation create-stack \ --stack-name application \ --parameters file://./vars.json \ --template-body file://./application.json \ --capabilities CAPABILITY_NAMED_IAM --profile dev
aws cloudformation delete-stack --stack-name application --profile dev
|
Infrastructure
1 Config the VPC with 3 Subnets
- VPC
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
| "VPC": { "Type": "AWS::EC2::VPC", "Properties": { "CidrBlock": { "Ref": "VPCCIDRBLOCK" }, "Tags": [ { "Key": "Name", "Value": { "Ref": "VPCNAME" } } ] } }
"InternetGateway": { "Type": "AWS::EC2::InternetGateway", "Properties": { "Tags": [ { "Key": "Name", "Value": { "Ref": "IGWNAME" } } ] } }, "VPCGatewayAttachment": { "Type": "AWS::EC2::VPCGatewayAttachment", "Properties": { "VpcId": { "Ref": "VPC" }, "InternetGatewayId": { "Ref": "InternetGateway" } } },
|
CIDR Block