DevOps Classroom notes 29/Oct/2025

Terraform

  • Terraform is most popular infra provisioning tool
    Preview
  • Terraform works with many on-prem hypervisors and cloud providers (virtual)
  • Terraform is from Hashicorp and is developed in Golang.
  • Terraform installation is all about downloading one simple executable.

Terraform components

  • Providers: This refers to where we are trying to create infra
  • Resource: This is infra element which we are trying to provision
  • Arguments: refers to the inputs
  • Attributes: refers to the outputs

How Terraform manages infra (First Version)

  • User creates terraform templates where the desired state is expressed. Terraform templates are files with .tf extension in a folder.
  • Terraform when installed is a single executable and it doesn’t know how to create infra. Depending on the providers defined used terraform will download the necessary providers into .terraform folder, Terraform executable can communicate with this provider.
  • When providers communicate to the cloud they need to be authenticated.
  • Terraform keeps track of what it has provisioned in a state file .tfstate

Creating infra once template is ready

  • Terraform providers need to be downloaded for that cd into the folder terraform init
  • To Create infra terraform apply
  • To delete terraform destroy

Expressing Desired State with Terraform

  • Terraform using HCL (Haschicorp configuration language)
  • step 1: Manually know how to create resources

Findout how to create aws s3 bucket

  • Prompt:
You are an aws expert, I want to know the steps involved in creating a simple s3 bucket from aws console. Give me step by step instructions
  • provider: aws
  • region: us-west-2
  • resource: s3 bucket
  • input:
    • bucket-name

In Terraform

  • Create a new folder awshellotf
  • open this folder in vs code and ensure visual studio code has terraform extension.
    Preview
  • create a file called as main.tf
  • we need to configure provider now google for terraform aws provider
    Preview
  • copy the highlighted section into main.tf
  • Now we need to create resource. now search for terraform aws s3 bucket

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