DevOps Classroom notes 27/Dec/2023

Terraform workspaces

  • Each workspace can be considered as an environment.
  • If we add backend to work space, there will be a backend per workspace
  • By default in terraform we always use workspaces. The default workspace is called default
  • Refer Here for official docs
  • Lets create 3 workspaces
    • dev
    • qa
    • uat

  • Create 3 tfvars having one variable file per environment
  • Lets write a very simple resource
  • Refer Here for changes
  • Now ensure you are using same template from multiple systems as tried in backend
  • Ensure user1 is in Dev workspace and user 2 in qa workspace

  • Lets apply the terraform from user1 and user 2


  • Now lets try by creating uat from both user 1 and user 2

Terraform import resources

  • Refer Here for official docs
  • Watch classroom recording for importing aws and azure resources.
Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a comment

Turn on JavaScript to leave a comment.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Social Media Icons Powered by Acurax Web Design Company
Exit mobile version
%%footer%%