Cloudformation contd..
- Lets add the format version to Cloud formation json files Refer Here
- Adding Format version
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Resources": {
"mys3bucket" : {
"Type" : "AWS::S3::Bucket",
"Properties" : {
"BucketName": "qts3fromcftbd"
}
}
}
}
Scenario: Lets Create a virtual private cloud (VPC)
- Choose a private network range

- Lets create one vpc manually

- Now lets try to create this from cloud formation template
- Dev Setup:
- Ensure Visual studio code is installed
- Install cf extension

- Now Add a template with vpc resource

- Refer Here for the changes done
- Now lets create a stack using this template

- In the template the cidr value is fixed to 10.10.0.0/16, if the users want to create a network with some other range they have to change template which is not a good sign, so to add flexibility of the users to pass values, lets use Cloud formation parameters Refer Here
- Refer Here for the changeset
- Now lets update the stack or delete and recreate

- It is a good practice to create parameters for all the possible changes that can happen in architecture
- What will happen if i change certain values in cloudformation
- Changes to properties in cloudformation might have
- no impact
- recreated
- This is reflected in the documentation

- Exercise: Try changing CIDR value and observe the replace in the AWS Cloudformation stack.
