Terraform contd
ntier network in Azure
- Manual steps:
- Create a resource group
- Create a vnet Refer Here for screenshots
- network: 10.10.0.0/16
- subnets:
- web: 10.10.0.0/24
- app: 10.10.1.0/24
- db: 10.10.2.0/24

- subnets:
- Terraform implementation:
- Refer Here for basic strucuture and terraform constraints added
- Refer Here for resource definitions done

- Refer Here for the variables added
- To pass input variables we have two options
- option 1: from cli directly using
-varterraform apply -var 'resource_group_name=ntier-dev' -var 'location=eastus' - option 2: create a file with variable values Refer Here. Refer Here for the changes to accomodate ntier with tfvars
Terraform concepts
- Terraform block: Refer Here.
- Terraform block can help in setting provider requirements Refer Here as well as terraform requirements Refer Here.
- There are other areas as well, which we will be discussing in later parts fo course
- Version constraints: Refer Here
- Data types: Refer Here
- Terraform input variables Refer Here
