Multi region ntier – Azure
step 1
- Lets create resource group
- Lets create vnet with subnets
- we need to create primary and secondary
modules in terraform
- A module is a reusable terraform template
- A module will not have provider in it
- variables defined become arguments to modules
- outputs defined become attributes of modules
- Terraform registry maintains lots of community modules
- A module can be executed from a template
Using community modules
Lets create a module for virtual network creation
- Refer Here for the changes done to create a module for virtual network and creating primary and secondary vnets
Exercise
- Create a module for a vpc
- public_subnets
- private_subnets
- internet_gateway
- From a template try creating two vpcs by calling the same module twice
- note: use the same region
