Friday, December 30, 2022

How to Create a VPC Using Cloudformation

Below Are the Points which we will following in sequence.

  1. Create VPC
  2. Create Public Subnets
  3. Create Internet Gateway
  4. Attach the Internet Gateway to the VPC
  5. Create Public Route Table
  6. Create Public Route and add to the Public Route Table
  7. Associate the Public Subnets with the Public Route Table
  8. Create EC2 Instance
  9. Create SSH Key Pair
  10. Create ElasitcIP
  11. Create Security Group
 

Initially we will create new file name as main.yaml and will add below format, which is described in one by one steps.

Create New File:
main.yaml

Let's add Cloud formation Template Format Version and Description.



Step 1) Create VPC




Step 2) Create Public Subnets



Step 3) Create Internet Gateway



Step 4) Attach the Internet Gateway to the VPC



Step 5) Create Public Route Table



Step 6) Create Public Route and add to the Public Route Table



Step 7) Associate the Public Subnets with the Public Route Table



Step 8) Create EC2 Instance



Step 9) Create SSH Key Pair



Step 10) Create ElasitcIP 




Step 11) Create Security Group

 

" If You are Still Struggling to align all the Resources into single template, 

So don't worry I am sharing complete template below."

 


 

No comments:

Post a Comment

testing