Workspaces | Terraform Tutorial | #16

Published: 02 July 2020
on channel: Will Brock
52,308
915

Workspaces allow the use of the same configuration but having separate state backends for each workspace. One use case is having production and dev workspaces. This allows the same setup for both environments but each with their own state. When working in the dev workspace you can ensure that you are only modifying that infrastructure and not production. This is great for testing changes without affecting other environments.

In this video tutorial I'll create a couple examples of working with dev and production workspaces in Terraform.

Use the CLI to create, update, switch, list, show and delete workspaces
Use dev.tfvars and prod.tfvars files to set different variables depending on the workspace
Examine the different state between workspaces
Access the current workspace in config files with terraform.workspace

Course Examples:
https://github.com/WillBrock/terrafor...

Documentation:
https://www.terraform.io/docs/state/w...


On this page of the site you can watch the video online Workspaces | Terraform Tutorial | #16 with a duration of hours minute second in good quality, which was uploaded by the user Will Brock 02 July 2020, share the link with friends and acquaintances, this video has already been watched 52,308 times on youtube and it was liked by 915 viewers. Enjoy your viewing!