Viewing the current state
-
terraform console – Infrastructure as Code (IaC) with Terraform
The terraform console command provides an interactive console to investigate state files, dynamically build paths, and evaluate expressions even before using them in resources. It is a potent tool that…
-
Viewing the current state – Infrastructure as Code (IaC) with Terraform
To view the current state, we can run the following command:$ terraform show That will output all resources that Terraform has created and manages, including outputs. Of course, this can…
-
Managing Terraform state – Infrastructure as Code (IaC) with Terraform
Terraform uses a state file to track what it has deployed and what resources it is managing. The state file is essential as it records all the infrastructure Terraform maintains.…
-
Terraform modules – Infrastructure as Code (IaC) with Terraform
Terraform modules are reusable, repeatable templates. They allow abstraction in provisioning infrastructure, which is much needed if your usage grows beyond just some proof of concept. HashiCorp visualizes modules as…
-
terraform destroy – Infrastructure as Code (IaC) with Terraform
To destroy the resource group, we can run a speculative plan first. It is always a best practice to run a speculative plan to confirm that what we need to…