CloudFormation contd..
- Lets try to create the following architecture from cloudformation
- Phase 1:
- vpc with six subnets
- internet gateway and attaching internet gateway
- Clone the repo Refer Here
- Steps:
- Created a template with vpc Refer Here
- For template deployment lets ensure AWS CLI is installed and IAM User is configured
- Installing AWS CLI Refer Here
- Configure IAM user Refer Here
- Create a cloudformation stack from aws cli Refer Here
- The command will be like execute this command and make a note of stack id
aws cloudformation create-stack --stack-name ntier-dev --template-body file://ntier.json- Now lets try to add one subnet Refer Here
- Refer Here for the changeset
- Now execute the command from cli
aws cloudformation update-stack --stack-name ntier-dev --template-body file://ntier.json - Add other 5 subnets Refer Here for the changes
- Now update the stack
aws cloudformation update-stack --stack-name ntier-dev --template-body file://ntier.json
- To summarize:
- Cloudformation stacks can be created from cli
- create-stack
- update-stack
- delete-stack
- Cloudformation stacks can be created from cli
