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
    Preview
  • Refer Here for official docs
  • Lets create 3 workspaces
    • dev
    • qa
    • uat
      Preview
      Preview
  • Create 3 tfvars having one variable file per environment
    Preview
  • Lets write a very simple resource
    Preview
  • 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
    Preview
    Preview
  • Lets apply the terraform from user1 and user 2
    Preview
    Preview
    Preview
  • Now lets try by creating uat from both user 1 and user 2
    Preview

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 Reply

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

Please turn AdBlock off
Animated Social Media Icons by Acurax Responsive Web Designing Company

Discover more from Direct DevOps from Quality Thought

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

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube