DevOps Classroom notes 28/Sep/2024

Terraform modules

  • Module is a reusable Terraform template
  • Every terraform template is a root module which calls the child modules
  • child modules are resuable terraform configuration
  • Child Modules can be present
    • in local system
    • in git repo
    • in Terraform cloud
    • in jfrog

Activity – 1: Create a ntier architecture in aws

  • Lets convert the work done earlier into modules
  • to create ntier architecture, we need
    • vpc
    • security groups
    • ec2/autoscaling groups
    • load balancers
  • We have started creating modules inside the root module
ntier
  modules
     vpc
       main.tf
       variables.tf
       outputs.tf
  providers.tf
  main.tf
  • Refer Here for changes
  • Using modules like this is done on servers where all the terraform modules are present on a network file share.
  • Lets have our modules hosted seperately on Git
  • Refer Here for the module
  • for referring module from git Refer Here for git and Refer Here for subdirectories
  • Refer Here for the security group module
  • Refer Here for using the security group module from git

Activity – 2: Create a ntier architecture in azure

  • Lets convert the work done earlier into modules
  • to create ntier architecture, we need
    • virtual network
    • network security groups
    • vm/vmss
    • load balancers

Terrascan

  • This scans terraform for security vulnerabilities and generates the report
  • Refer Here

Terraform cloud

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
Plugin for Social Media by Acurax Wordpress Design Studio

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