Modules contd
Provider aliasing
- In AWS provider is linked to region and credentials
- In Azure provider is linked to credentials
- If we want multi region solution in aws we cant use it with one provider and in the same way we cant use the same provider for different accounts, to solve this problem terraform supports alias
Lets create a module for vpc
- Refer Here for the changes done
Lets create a module in azure for network security group
- Refer Here for the changes done
Exercise
- create a module in aws for security group
Datasource
- Refer Here
- Every provider in terraform comes with
- resource: infra where we experess desired state
- datasource: to query about infra with provider
- Refer Here for datasources example
