Terraform contd
Terraform Hashicorp configuration language (HCL)
- Refer Here for the official documentation
- For syntaxes Refer Here
Activity: Creating a ntier network in Azure
-
Create a network as shown below
-
Manual steps
- Creating a resource group
- Create a vnet with cidr range (address space)
- Add subnets to vnet
- For screenshots refer classroom video.
Writing terraform template for the same (Creating ntier in azure)
- Terraform block Refer Here
- Using terraform block we can put restriction on terraform version and also terraform providers version
- While writing terraform template:
- copy paste’s should be avoided
- hardcoding the values
- Refer Here for the first version
- Refer Here for the changes with format
- When we executed apply, the resource creation failed and the reason is we need to specify order of creation.
Activity: Creating a ntier network (VPC) in AWS
-
Create a network as shown below
-
Manual steps:
- Create a vpc with cidr range mentioned
- Add subnets to vpc
- For screenshots refer classroom video.
