Menu

1 / 2

30-Day Cloud & DevOps Challenge: Day 12 — Terraform: Infrastructure as Code

DEV Community·Michelle·7 months ago
#gbt79RUE
#terraform#command#enter#exit#article
Reading 0:00
15s threshold

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…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.