You are currently viewing Terraform Workspace

Terraform Workspace

Terraform Workspace

Hello Everyone

Welcome to CloudAffaire and this is Debjeet.

In the last blog post, we have discussed terraform expressions.

https://cloudaffaire.com/terraform-expressions/

In this blog post, we will discuss terraform workspace.

What is terraform workspace?

Each Terraform configuration has an associated backend that defines how operations are executed and where persistent data such as the Terraform state are stored.

The persistent data stored in the backend belongs to a workspace. Initially, the backend has only one workspace, called “default”, and thus there is only one Terraform state associated with that configuration.

Certain backends support multiple named workspaces, allowing multiple states to be associated with a single configuration. The configuration still has only one backend, but multiple distinct instances of that configuration to be deployed without configuring a new backend or changing authentication credentials. Below is the syntax of terraform workspace

Next, we are going to explain terraform workspace with a demo.

Terraform workspace:

Hope you have enjoyed this article. In the next blog post, we will discuss terraform backends.

To get more details on terraform, please refer below terraform documentation.

https://www.terraform.io/docs/index.html

 

Leave a Reply