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 comment

Turn on JavaScript to leave a comment.

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
Exit mobile version
%%footer%%