Terraform Contd..
Terms
- Configuration Drift:
- Difference between actual and desired state
- In Terraform plan represents drift
Creating Database in Azure using Terraform
- We have added the resource to create sql server on azure and applied the template. Refer Here for the changes
- Terraform graph command creates dependency graphs in dot format which can be visualized in Graphviz. Refer Here for the command
Create VMs in Azure using terraform
- Overview of our goal
- Refer Here for manual steps
-
Refer Here for the changes.
- We have created a vm without public ip and database connectivity between vm and sql is using internet. We will work on this actvities in next session
- Improvements:
- Try to parametrize using variables and avoid creating too many variables by using object structure. Refer Here for changes
Terraform Datasources
- Till now we have used terraform to create resources in provider. Terraform can also query the provider for various information
- Refer Here for official docs
Terraform outputs
- Terraform output is result which would be shown in the stdout
- Refer Here for official docs
- Lets display private ip address and database endpoint as outputs Refer Here for the changes done
Ntier in AWS
Making subnets public and private
- Overview
- Creating internet gateway and attach to vpc. Refer Here for resource
- Refer Here for the changes done
- Now lets create two route tables
