There are three ways to bring cloud infrastructure into being, and only one of them survives contact with time. The first is the console: a person signs in, clicks through a wizard, chooses settings, and presses create. The result is real and immediate, and the record of how it was made is a browser history and a memory. The second is the script: an ordered list of commands, written down, that creates things in sequence. The third is declaration: a description of the finished estate, from which a tool works out what needs to happen.

The difference sounds like a preference about tooling. It is not. It is a difference in the question being answered, and every practical consequence follows from it.

Steps answer one question, truth answers another

A script answers the question: what should happen next? A declaration answers the question: what should be true when we are done?

The first question must be re-answered correctly every time, in every circumstance, including the circumstance where a previous run died halfway. A script knows only its steps. Run it twice and it may try to create what already exists, fail halfway, or create a second copy beside the first, because nothing in a list of steps knows what the world currently looks like.

A declaration is answered once, in files, and the tool re-derives the steps for whatever circumstance it finds. Terraform reads two things — your declaration, and the recorded state of what already exists — works out the difference, and proposes the shortest safe set of actions that closes it. If the estate already matches your declaration, the proposal is empty, and running the tool again changes nothing.

That property has a name worth learning: the operation is idempotent in effect. Apply the same declaration ten times and you get the same estate once, not ten estates and not an error.

What a declaration actually looks like

A declaration is written in HCL, and its unit is the resource block. A block opens with the word resource, then the resource type in quotes — say "aws_vpc" — then a local name in quotes — say "main" — then a body in braces holding argument lines, each an argument name, an equals sign, and a value.

For a production network, the body might carry cidr_block = "10.40.0.0/16" and a tags argument naming the estate and its owner. Nothing in that block says create. It says: a virtual private cloud answering to the local name main, with this address range, is part of what should be true.

Terraform, reading the block alongside its state, decides whether that means creating a network, leaving the existing one alone, or replacing it — because a network's address range cannot be edited in place. Fix the mental move early: you author truth; the tool authors steps.

This is also why scripting repetitive tasks well is a different discipline, not a lesser version of it. Renaming a thousand files or cycling laptops through a setup checklist are step-shaped jobs, and a script is the right tool. Provisioning an estate that must exist, match a reviewed description, and be rebuildable after a disaster is a truth-shaped job. Confusing the two is how teams end up with a provisioning script that is really a memoir of the day everything went right.

Three consequences a practitioner should be able to state

First, review becomes possible before money moves. Because the declaration is files, another person can read the intended estate before it exists, and because the tool derives a plan, the reviewer sees not just intent but consequence.

Second, the declaration is the documentation. A console estate's documentation is a separate document that begins rotting the day it is written. A declared estate's documentation is the thing that builds it. When the two disagree, the plan shows the disagreement.

Third, deletion is a first-class act. Remove a block from the declaration and the plan will propose destroying the resource, because the truth you declared no longer includes it. Beginners find this alarming. Professionals find it honest: in a declared estate, there is no resource nobody declared, quietly consuming money.

Declaration moves the difficulty; it does not remove it

None of this makes declaration magic. Someone must still decide what should be true — the address ranges, the sizes, the protections — and a wrong declaration applied confidently builds the wrong estate very reliably. The state file can itself be damaged, shared badly, or allowed to disagree with reality. And the tool can only manage what it is told about: a setting changed by hand in the console does not update your files; it corrupts your assumptions.

Declarative provisioning is therefore a bargain. You give up the speed of clicking and the familiarity of steps. In exchange you get an estate that can be reviewed before it exists, rebuilt after it is gone, and audited by comparing two texts: what you declared, and what the plan says reality needs to become.

The misconception to retire is that Terraform is just scripting with a different syntax, as if you write the steps in HCL instead of Bash. The syntax is the least of it. A script performs steps in order and knows nothing about the world between runs; a configuration declares a finished state, and Terraform derives the steps from the gap between that declaration and the recorded world. Write HCL as if it were steps — ordering tricks, one-run files, commands smuggled in to do by hand what a resource should declare — and you get the fragility of a script with the learning curve of a new language, and the rebuild guarantee of neither.

Experience it, don’t just read about it

Desired state, not clicked state is Concept 1 of Terraform and Infrastructure as Code: Provision Cloud Infrastructure You Can Rebuild on Demand (Course No. 349), from Cognosco Learning, a learning company powered by AI. The course builds the full provisioning discipline beyond this distinction — State, Plan Before Apply, and The Rebuild Standard — each worked through with an Agentic Socratic AI coach, one learner at a time. Try a Free Preview at cognoscolearning.com.

Try a Free PreviewAll Signature CoursesThe Corporate License

Navigate your own course.

← All Insights

© 2026 Cognosco Learning. All rights reserved.