- We have to define and provision a Virtual Private Cloud (VPC) infrastructure.
- The Terraform configuration files for this step can be found in this repository
- You need to create separate
.tf
files for each resource, as I did
- Now , I explain what this each file will do :
- vpc.tf for creating a separate Virtual Private Cloud (VPC).
- pub-subnets.tf for creating public subnets inside the new VPC.
- For making subnets public , we have to associate it with Internet gateway through route table.
- internet-gateway.tf for creating Internet gateway inside the new VPC.
- pub-route-table.tf for creating route table and associate public subnets with Internet gateway.
- pri-subnets.tf.tf for creating private subnets inside the new VPC.
- This above files will create a separate VPC infrastructure for you .