# Infrastructure as Code: Provisioning EC2 and S3 Using Terraform on AWS

Welcome to another part of my cloud journey! This week was all about stepping into the world of **Infrastructure as Code (IaC)** using **Terraform**. Instead of manually clicking through the AWS Console, I learned how to automate the provisioning of infrastructure using code — and it felt like unlocking a superpower. 🚀

---

## 📘 What This Week Was About

I focused on using **Terraform** to provision two core AWS resources:

* An **EC2 instance** (a virtual machine in the cloud)
    
* An **S3 bucket** (AWS’s object storage service)
    

It marked my shift from doing things manually to describing my infrastructure in code — making deployments faster, consistent, and repeatable.

---

## 🧠 What I Did

Here’s what I tackled during the week:

1. **Installed Terraform CLI**  
    → Got Terraform set up locally.
    
2. **Configured Terraform to use AWS**  
    → Used an **IAM user** with programmatic access (access key and secret key).
    
3. **Created core Terraform files**
    
    * [`main.tf`](http://main.tf): Defined my EC2 instance and S3 bucket.
        
    * [`variables.tf`](http://variables.tf): Declared input variables for flexibility.
        
4. **Deployed Infrastructure**
    
    * Ran `terraform init`, `terraform plan`, and `terraform apply` to spin everything up.
        
5. **Bonus**: I automated **S3 event notifications** using Terraform — integrating knowledge from Week 2!
    

---

## ⚙️ Tools I Used

* **Terraform CLI**
    
* **AWS IAM User** (with appropriate permissions)
    
* **EC2 & S3 Services**
    

---

## 🚀 Why This Was So Powerful

* 🔁 **Repeatability**: I can now recreate environments with a single command.
    
* 📜 **Version control**: My infrastructure is now stored in code, tracked in Git.
    
* 💼 **Real-world skills**: This is exactly what DevOps and Cloud Engineers do daily.
    

Terraform opened a new door — from messy, manual setups to clean, consistent, and scalable infrastructure deployment.
