Managing Terraform 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…
-
Terraform workspaces – Infrastructure as Code (IaC) with Terraform-2
To access the name of the workspace, Terraform provides the terraform.workspace variable, which we have used to define the resource_group name. So, the template is now ready to take configuration…
-
Terraform workspaces – Infrastructure as Code (IaC) with Terraform-1
Software development requires multiple environments. You develop software within your workspace, deploy it into the development environment, unit test it, and then promote the tested code to a test environment.…
-
Using the Azure Storage backend – Infrastructure as Code (IaC) with Terraform
As we will end up in a chicken -or- egg situation if we use Terraform to build a backend to store its state, we will have to configure this bit…
-
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.…