DevOps Classroom notes 02/Apr/2026

Setting up Terraform with AWS

  • Prompt
You are an expert in Terraform

I'm trying to setup Terrform to work with AWS

I want to use AWS CLI based credentials,

Give me guidance to setup all the necessary softwares like
  Terraform 
  AWS CLI
  Visual studio Code
using a package manager  


Give me steps to create IAM user in AWS Console
Now give me steps to configure AWS CLI Credentials for an IAM USer 
I'm using windows 11 

  • Create a new folder with aws-test and in that create a main.tf
# provider
provider "aws" {
    region = "ap-south-1"
}


# resource
resource "aws_s3_bucket" "first" {
    # argument
    bucket = "qt-apr-1-test-from-tf"

    tags = {
      Environment = "Dev"
      Project = "learning"
    }

}
  • Now execute
terraform init
terraform apply
terraform destroy

Setting up Terraform with Azure

You are an expert in Terraform

I'm trying to setup Terrform to work with Azure

I want to use Azure CLI based credentials,

Give me guidance to setup all the necessary softwares like
  Terraform 
  Azure CLI
  Visual studio Code
using a package manager

Now give me steps to configure Azure CLI 

I'm using windows 11
  • try the same with azure_test folder and main.py with following content
terraform {
  required_providers {
    azurerm = {
      source  = "hashicorp/azurerm"
      version = "=4.1.0"
    }
  }
}

# Configure the Microsoft Azure Provider
provider "azurerm" {
  resource_provider_registrations = "none" # This is only required when the User, Service Principal, or Identity running Terraform lacks the permissions to register Azure Resource Providers.
  features {}
  subscription_id = "<your subscription id>"
}

resource "azurerm_resource_group" "example" {
  name     = "example-resources"
  location = "eastus"
}
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%%