DevOps Classroom Series – 22/Oct/2020

Terraform modules

  • Terraform has lot of modules developed by community, rather than creating templates by writing from scratch we can create a architecture by using community modules
  • Now lets use terraforms vpc module from module registry Refer Here
  • Refer to third party modules and search for them over here

Problem Statement:

  • In Terraform since multiple users can simultaneously request for infrastructure creation, we implement Remote Backend
  • Now from the above image if the infrastructure has to be created for multiple environments like
    • Dev
    • QA
    • Staging
  • How will we manage that?
    • Make the infra creation as a module and create a terraform template per enviroment with different backend.
    • Terraform has a concept of workspaces. Using workspace we can create multiple environments from the same terraform template.
  • Terraform by default creates a workspace called as default. we can create multiple environments using terraform workspace
  • Execute the commands as shown below
  • Refer Here for the changes done

Leave a ReplyCancel reply

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

Please turn AdBlock off
Social Network Integration by Acurax Social Media Branding 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%%