DevOps Classroom notes 27/Sep/2024

Terraform Best Practices


How enterprises use Terraform

  • We write templates
  • All the resusable templates are converted into modules and store in a registry
  • Registry Options
    • Terraform Cloud
    • Jfrog
    • Git
  • Structure
template (folder)
|
---- providers.tf
---- main.tf # calling modules by passing values

  • Security Scanning terrascan

Terraform Registry (Public)

  • Lets create a vpc, security group and an ec2 instance by using reusable community modules
  • Refer Here for aws community modules
  • Refer Here for changes done to use community modules

Terrraform Provisioners

  • Refer Here for official docs
  • Types
    • file
    • local-exec
    • remote-exec
  • Connection block: in this block we will pass credentials
  • How to use provisioner in terraform to install nginx into ec2 instance.
  • Refer Here for changes

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