Topic 21

Console Clicks vs Code

Concept

Sam needs a server for Pageturn. The quick way is to open his cloud provider's website — a control panel called a console — pick a size from a menu, choose a region, click "create," and then click through a dozen more settings by hand. A few minutes later, a server exists. It works, and the first time, it feels perfectly reasonable.

The trouble starts the second time. When Sam needs another server — a copy for testing, or a replacement after a crash — he has to remember every menu and every box he clicked. Nobody wrote it down, because the clicking was the doing. Infrastructure as code is the move that fixes this: instead of clicking, you describe the server you want in a file, and a tool reads that file and builds it.

Two ways to set up the same server
Clicking in a console
Set it up by hand through the provider's website. Fast the first time, but unwritten and unrepeatable — the next one comes out a little different, and nobody can say exactly how it was built.
Describing it in a file
Write down what you want. The file is the record: readable, reviewable, and repeatable. Run it again and you get an identical server, every time, no memory required.

What "the console" means

A console here is just the web dashboard a cloud provider gives you — a screen full of menus and buttons for creating servers, networks, and storage by hand. (It's the same word as a game console only by coincidence; here it means a control panel.) You log in, you click around, and infrastructure appears.

For one server, set up once and never touched again, that's genuinely fine. The console isn't a trap — it's the natural first thing everyone reaches for, and it's how most people meet the cloud. The problem isn't the console itself; it's what happens when you need to do the same thing more than once.

Why clicking doesn't scale

Clicking has three quiet weaknesses. It's unrepeatable: the steps live only in Sam's head and his hands, so the next server is built from memory and rarely matches the last one. It's undocumented: there's no record of what was chosen, so a teammate can't see how the server was set up, only that it exists.

And it drifts. Over months, someone clicks a small change here, another there, and the servers slowly diverge until no two are quite alike — a state engineers call configuration drift. When one server behaves differently from another and nobody knows why, drift is usually the reason.

Describing infrastructure in a file

Infrastructure as code, or IaC, swaps the clicking for writing. You describe the infrastructure you want — this many servers, this size, this region, this network — in a plain text file, and a tool reads that file and makes reality match it. The file says what you want; the tool figures out the clicking for you.

Think of assembling flat-pack furniture. Doing it from memory each time, you'll get a slightly different wobble every round. Following the printed instructions, anyone produces the same shelf, the same way, again and again. The IaC file is those instructions for your infrastructure — and unlike furniture, the tool follows them for you.

The file as the source of truth

Once the infrastructure lives in a file, that file becomes the single source of truth — the one authoritative description of what should exist. Because it's just text, it goes into version control alongside the app's code (the repo from Chapter 3), so every change is recorded, reviewed in a pull request, and rolled back if it's wrong.

That's the real shift. Setting up servers stops being a private act of clicking and becomes a written, shared, reviewable thing — the same discipline the team already uses for code, now pointed at the machines the code runs on. The next two topics split that work into its two halves: creating the machines, and making them ready.

Common Confusions
  • "IaC means writing a real programming language." Mostly not. You're describing the result you want — this server, this size — more like filling in a structured form than writing the step-by-step logic of a program.
  • "Clicking is fine, it's faster." Faster once, yes. But the moment you need a second identical server, or have to explain how the first was built, the unwritten clicks become the slow, error-prone part.
  • "IaC is only for servers." The same file can describe networks, storage, and databases too — anything the provider offers. "Infrastructure" is the whole environment, not just the machines.
  • "The file replaces the cloud provider." No — the provider still runs everything. The file just describes what to create; the tool talks to the same provider you would have clicked through by hand.
Why It Matters
  • IaC is how almost all modern infrastructure is built — knowing the "why" here is what makes Terraform and Ansible make sense later instead of feeling like arbitrary tools.
  • It explains "configuration drift," a phrase you'll hear whenever two servers that should match mysteriously don't.
  • Putting infrastructure in version control means servers get the same review and rollback safety as application code — a huge part of why teams trust frequent changes.
  • This is the doorway to the two IaC deep dives: Terraform for creating infrastructure and Ansible for making it ready, both of which you'll meet in the next two topics.

Knowledge Check

What is the main problem with setting up servers by clicking through a console?

  • The steps aren't written down, so it's hard to repeat exactly and to document
  • Clicking through the provider's console can't actually create a real working server
  • Servers made by clicking run more slowly than ones made from a file
  • Using a console always costs more money than using a file

In infrastructure as code, what does the file actually do?

  • It describes the infrastructure you want, and a tool reads it and builds it
  • It replaces the cloud provider so you no longer need one
  • It is just a saved snapshot photo of a server you already built earlier by hand
  • It contains the application's features and business logic

Why is it useful that an IaC file can live in version control?

  • Infrastructure changes can then be reviewed and rolled back like code
  • Storing the file in version control somehow makes the running servers go faster
  • It means you no longer need a cloud provider at all
  • It automatically watches the running servers for problems

You got correct