Provisioning
- Terraform provisioner also works but use it as last resort
- To run the terraform provisioning every time terraform apply is used we need to take help of
null_resource - Refer Here for changes which include provisioning to be called whenever a variable changes.
Backend
- Backends in terraform refers to the location where state is stored.
- We have two types of backends
- local (default backend)
- remote
S3 Backend
- Lets create a bucket with versioning enabled
- Refer Here for the changes done to configure backend
- Exercise: Azurerm backend
Workspaces
- We have create a tfvars file per environment Refer Here
- I want to use the same folder to manage multiple environments.
- Terraform supports this using workspaces
- Refer Here
Next Steps
- Reverse Engineering
- K8s Cluster from terraform
