DevOps Classroom notes 21/May/2025

Writing Terraform Templates

Installation

  • Windows
    • Terminal Setup
    • Git For Windows
    • chocolatey or winget
    • Visual Studio Code
    • Terraform
    • AWS CLI
    • Azure CLI
  • Mac
    • Homebrew
    • Git brew install git
    • Visual Studio Code brew install --cask visual-studio-code
    • Terraform brew tap hashicorp/tap && brew install hashicorp/tap/terraform
    • awscli brew install awscli
    • azure cli brew install azure-cli

Writing templates

  • create a new folder
  • open this in visual studio code (Ensure Terraform extension is installed)
  • create a new file called as main.tf
  • Terraform uses Hashicorp Configuration language, Resources, Providers are Blocks
<block-type> <name> .. {

}
provider <name> {
    arg1 = value
    ..
    ..
    argn = value
}
resource <type> <name> {
    arg1 = value
    ..
    ..
    argn = value
}
  • When we pass arguments terraform has the following data types

Configuring terraform to work with AWS

Configuring terraform to work with Azure

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