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 ReplyCancel reply

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

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Exit mobile version
%%footer%%