Student Reviews
( 5 Of 5 )
1 review
Video of Terraform workspace How to handle Terraform Workspaces - Part 11 in Terraform course by Rahul Wagh channel, video No. 11 free certified online
Instruction's Guides
How to use Workspaces in Terraform? - https://jhooq.com/terraform-workspaces/
GitHub - https://github.com/rahulwagh/Terraform-Topics
Terraform workspace is a very logical concept where you can have multiple states of your infrastructure configuration. To put this in simple words if you are running an infrastructure configuration in a development environment then the same infrastructure can be run in the production environment.
The main benefit of terraforming workspaces we get is we can have more than one state associated with a single terraform configuration.
If you have not defined any workspace then there is always a default workspace created by terraform, so you always work in a default workspace of terraform. You can list the number of terraform workspaces by running the command terraform workspace show. Also, you can not delete the default workspace
In this lab session, we are going to see -
1. What is Terraform workspace?
2. How to create a new Terraform Workspace?
3. How to create multiple Terraform Workspace?
4. How to List all terraform workspace?
5. How to switch between Terraform workspace?
6. How to start an EC2 instance using dev and test workspace?
7. How to delete Terraform workspaces?
Timestamps
0:00 Intro
3:23 Terraform workspace file walkthrough
7:02 Terraform workspace list - For Showing all workspaces
8:26 Terraform workspace new - Create a new workspace
10:49 Terraform workspace select - Switch or select the terraform workspace
11:59 ${terraform.worspace} - Terraform workspace variable
12:55 Create an EC2 instance using terraform workspace
For more details on Terraform here is the official guide on aws_key_pair -https://www.terraform.io/docs/language/state/workspaces.html
To learn more on DevOps visit - https://jhooq.com
Disclaimer/Policy: All the content/instructions are solely mine. The source is completely open-source.
Video is copyrighted and can not be re-distributed on any platform.
#devops #terraform #cloud #ec2