Terraform modules
- Terraform has lot of modules developed by community, rather than creating templates by writing from scratch we can create a architecture by using community modules
- Now lets use terraforms vpc module from module registry Refer Here
- Refer to third party modules and search for them over here
Problem Statement:
- In Terraform since multiple users can simultaneously request for infrastructure creation, we implement Remote Backend

- Now from the above image if the infrastructure has to be created for multiple environments like
- Dev
- QA
- Staging
- How will we manage that?
- Make the infra creation as a module and create a terraform template per enviroment with different backend.
- Terraform has a concept of workspaces. Using workspace we can create multiple environments from the same terraform template.
- Terraform by default creates a workspace called as default. we can create multiple environments using terraform workspace
- Execute the commands as shown below

- Refer Here for the changes done
