Terraform installation
Terraform Workflow
- Create a new folder for every infra
- we will be adding .tf files
- initialize terraform
- validate terraform
- format terraform
- apply
- destroy

Configuring Terraform AWS and AzureRm Provider (Authentication)
- Ensure your system is configured as discussed in the class
- Azure example
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "4.2.0"
}
}
}
provider "azurerm" {
# Configuration options
features { }
subscription_id = "<your-subcription-id>"
}
resource "azurerm_resource_group" "test" {
name = "test"
location = "eastus"
}
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "5.67.0"
}
}
}
provider "aws" {
# Configuration options
}
resource "aws_vpc" "base" {
cidr_block = "10.0.0.0/16"
tags = {
Name = "aws-vpc"
}
}