So far in this challenge, I've built containers, set up CI/CD with Jenkins, and pushed images to Docker Hub.
But there was one missing piece: how do I create the actual servers where all this runs?
Today, I started learning Terraform, a tool that lets you create infrastructure (servers, networks, databases) using code instead of clicking around in a web console.
No more "ClickOps". No more "it works on my machine". Just code that creates real infrastructure.
First: What is Infrastructure as Code (IaC)?
The Manual Way (ClickOps)
AWS Console -> Click "Launch Instance" -> Choose settings -> Click "Create" EC2 Console -> Click "Create Security Group" -> Add rules -> Click "Create" VPC Console -> Click "Create VPC" -> Configure -> Click "Create"
Enter fullscreen mode
Exit fullscreen mode
The problems:
No record of what you created
Can't reproduce exactly the same way twice
Easy to make mistakes
No version control
Only the person who clicked knows what happened
The IaC Way (Terraform)
# main.tf…