🚀 Terraform Day 3: Creating My First AWS Resource with Terraform (S3 Bucket)
Source: Dev.to

“Infrastructure becomes real when code creates something in the cloud.”
Day 3 was the most exciting day so far in my Terraform journey. Until now, Terraform was just concepts, providers, and commands. Today, I built real cloud infrastructure using code — an AWS S3 bucket.
This was my first full Terraform workflow:
- Write code
- Initialize
- Plan
- Apply
- Modify
- Destroy
Seeing AWS respond to my code felt powerful.
🎯 Objective of Day 3
- ✅ Learn how to provision AWS resources using Terraform
- ✅ Practice Terraform command workflow
- ✅ Understand how Terraform tracks infrastructure
- ✅ Learn safe deployment and deletion
- ✅ Build confidence working with real cloud services
🛠️ Writing the Terraform Code
I started by creating a configuration file (main.tf).
Provider Configuration
provider "aws" {
region = "us-east-1"
}
S3 Resource Configuration
resource "aws_s3_bucket" "demo" {
bucket = "my-terraform-first-bucket-1234"
tags = {
Name = "Terraform S3 Bucket"
}
}
⚠️ S3 bucket names must be globally unique.
⚙️ Terraform in Action
Terraform follows a simple but powerful workflow.
Step 1: Initialize
terraform init
Downloads providers and sets up your project.
Step 2: Plan
terraform plan
Shows what will change before anything breaks.
Step 3: Apply
terraform apply
Creates actual cloud resources. Terraform showed my S3 bucket in AWS — created in seconds ✅
🧩 Updating Infrastructure
I updated tags in the configuration and ran:
terraform plan
terraform apply
Terraform:
- ✅ Detected change
- ✅ Modified resource
- ✅ Updated state file
No recreation—only updates.
💣 Destroying Everything
terraform destroy
Terraform:
- ✅ Identified managed resources
- ✅ Deleted safely
- ✅ Left nothing behind
Clean infrastructure, zero cost risk.
🔐 AWS Authentication
Before running Terraform:
aws configure
Terraform uses credentials from:
- AWS CLI
- Environment variables
- IAM roles
No credentials = No cloud access.
🧠 Key Lessons from Day 3
- Terraform manages the full lifecycle.
- State tracks reality.
planprevents mistakes.- Code controls the cloud.
destroyis safe and simple.- Documentation > autocomplete.
🏁 Conclusion
This day changed how I see infrastructure. Terraform didn’t just describe resources — it created them. And then it removed them just as cleanly.
Tomorrow: Even deeper into Terraform’s core 🚀