Infra Provisioning using Cloud formation
- Cloud formation is infra provisioning tool used to create AWS resources.
- Here we can express desired state in json or yaml.
- The input to cloudformation is a file
- Cloudformation template syntax Refer Here
- Ensure the following extension is installed in visual studio code

Activity 1: Lets create an s3 bucket using Cloud formation
- Resource :
- s3 bucket
- name
- location
- s3 bucket
- Resource syntax Refer Here
- Template
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Resources": {
"mys3": {
"Type": "AWS::S3::Bucket",
"Properties": {
"AccessControl": "Private",
"BucketName": "qtcftestdec23"
}
}
}
}
- For screenshots refer classroom video. Create a stack using the above template

- If we want to delete all the created resources delete the stack.
- Refer Here for the changes
- Once the resource is create and if you want to change certain values in a resource
- check the update requires value.
- No interruption: if it has no interruptions then the resource can be update in place.

- Replacement: the resource will be recreated (deleted and created)

- No interruption: if it has no interruptions then the resource can be update in place.
- check the update requires value.
Activity 2:
- Create a vpc with 3 subnets

- Refer Here for the changes to add a vpc with a parameter to accept vpc address


-
Lets add the web subnet Refer Here for the changes
- Exercise: Add other 2 subnets
