Install Terraform, understand HCL syntax, configure a provider, and provision your first cloud resource.
You describe the infrastructure you want in HCL files. Terraform talks to cloud APIs to create, update, or delete resources to match your description. The same config works across AWS, GCP, Azure, and 800+ other providers.
# Download from terraform.io/downloads
# Mac: brew install hashicorp/tap/terraform
terraform --versionterraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 5.0"
}
}
}
provider "aws" {
region = "us-east-1"
}
# Create an S3 bucket
resource "aws_s3_bucket" "my_bucket" {
bucket = "my-unique-bucket-name-12345"
tags = {
Environment = "dev"
Project = "terraform-course"
}
}terraform init # download providers
terraform plan # preview changes
terraform apply # apply changes (prompts for confirmation)
terraform destroy # tear everything downterraform plan before every apply. It shows exactly what will be created, modified, or destroyed — like a dry run. Review it carefully. Surprises in plan are much better than surprises in production.terraform init downloads providers. plan previews. apply executes. destroy tears down.terraform plan output before applying.