Terraform Contd
Azure Provider
- Refer Here for the provider documentation
- To install azure cli Refer Here. To authenticate azure cli
az login
az group list
Providers and resources
- In terraform to create any resource we need to configure provdier
- Every provider has a specific structure
provider "<name>" {
<ARGUMENT-1> = <VALUE-1>
..
..
..
<ARGUMENT-N> = <VALUE-N>
}
- AWS Provider argument reference Refer Here
- Azure Provider argument reference Refer Here
- Resource: The syntax or structure of resource in terraform template is
resource <type of resource> <name> {
<ARGUMENT-1> = <VALUE-1>
..
..
..
<ARGUMENT-N> = <VALUE-N>
}
- the type of resource will be in the form of
<provider>_<resource_type>
Manual Steps of VPC Creation
- Steps: Lets create a simple vpc
- Lets search for resource which lead to Refer Here
- Now look at arguments Refer Here
- Create the template as shown in this changeset Refer Here
- Now validate and apply