Explain What IaC Is
From console clicks to codified infrastructure
Suppose you need a virtual network, three servers, and a load balancer. You can open a cloud provider's web console and click each one into existence, or you can write a short file that declares those resources and let a tool build them for you. That file is the whole idea behind infrastructure as code[1]: you manage infrastructure with configuration files rather than through a graphical user interface.
Infrastructure as Code (IaC) is the practice of provisioning and managing infrastructure through machine-readable configuration files instead of manual, point-and-click actions. Terraform[2] is an IaC tool that lets you build, change, and version cloud and on-prem resources safely and efficiently by defining them in human-readable configuration files. The word code is doing real work here: the configuration is a durable artifact you keep, not a sequence of clicks that vanishes once performed.
That point is easy to misread. IaC is not merely a script that replays GUI clicks or a macro that drives a console; the configuration itself codifies the intended infrastructure, so it can be stored, reviewed, and reused like any other source code. Across this page, keep three ways of provisioning in view: the manual console, imperative scripts that list ordered commands, and declarative IaC, where you state the end result and the tool works out the steps. The comparison table above sets these three side by side. The two sections that follow pin down the properties that make Terraform's approach infrastructure as code and not just automation: it is declarative, and it is codified.
Declarative: describe the end-state, not the steps
The single most important property of a Terraform configuration is that it is declarative: it describes the desired end-state of your infrastructure rather than the ordered steps to build it. You write what you want to exist, for example a network with three servers attached, and Terraform determines the operations needed to reach that state. Terraform's configuration language is declarative[1], in contrast to procedural languages that require step-by-step instructions to perform a task.
A Terraform configuration is therefore not an imperative or procedural script that lists commands in execution order. In an imperative approach you specify the how: create this, then wait, then attach that, then configure the next thing, in exactly that sequence. In the declarative approach you specify the what, and the tool computes the how. Because it works from the finished picture, Terraform calculates the dependencies between resources[2] and creates or destroys them in the correct order for you, so you do not hand-sequence the graph yourself.
Declaring end-state does not mean Terraform bypasses the platform. Terraform creates and manages resources through their application programming interfaces (APIs)[2], the same APIs a console or a hand-written script would call. What makes it more than a thin wrapper around those calls is that it records the resources it manages in a state file and reconciles the real infrastructure back to the declared configuration on every run. That reconciliation is what a raw API call lacks: an imperative call fires once and forgets, whereas Terraform keeps comparing what exists against what you declared.
Terraform runs this reconciliation in three stages, its canonical write, plan, apply workflow. You write the configuration that declares the desired state. Terraform then builds a plan by comparing the desired state in your configuration against the current state of your real infrastructure[2], and describes what it will create, update, or destroy. On approval it applies that plan, performing the operations in dependency order until the real infrastructure matches the desired state. The figure traces that path from configuration to matching infrastructure.
Why codified beats manual: repeatable, versioned, reviewed
The payoff of codifying infrastructure is that the same configuration produces the same result every time. Apply it to an empty account and you get the environment; apply it again and Terraform makes no changes, because reality already matches the declared state. Manual or ad-hoc provisioning, clicking through a console or running undocumented one-off commands, cannot make that guarantee, because the exact sequence lives only in someone's memory or shell history. IaC lets you build, change, and manage infrastructure in a safe, consistent, and repeatable way[1] by defining resource configurations you can version, reuse, and share.
Once infrastructure is expressed as code, it inherits the everyday practices of software engineering. You can commit your configurations to version control[1] so every change has an author, a timestamp, and a diff; changes can go through code review before they are applied, exactly as application code does; and common patterns can be packaged and reused rather than rebuilt by hand each time. Human-readable configuration files that you can version, reuse, and share[3] are what make this possible.
Being codified is not the same as merely using an API. A one-off, undocumented API or CLI call is still ad-hoc: it is not infrastructure as code just because it goes through an API, because nothing about it is codified, versioned, or repeatable. The line is whether the definition is captured in a durable, reviewable file, not which transport carries the request. Terraform also keeps track of your real infrastructure in a state file[2], a recorded source of truth for what it manages, where console clicking leaves no such record at all.
Reading the figure left to right shows infrastructure as code following the same path a code change takes: you edit the configuration, commit it to version control, have the change reviewed, run terraform apply to reach the desired state, and the state file records the resources that now exist.
Exam-pattern recognition
TA-004 items for this objective test whether you can state what infrastructure as code is and separate the declarative model from an imperative one, with no provider-specific detail required. The stems are short and definitional, so the work is matching a precise description rather than recalling a command.
A common stem asks you to pick the best description of infrastructure as code. The right answer names managing and provisioning infrastructure through machine-readable configuration files; the tempting wrong answers describe automating console clicks, or call any use of a cloud API infrastructure as code. Reject both: a macro over a GUI and a bare API call are not codified, versioned, or repeatable, which is the property the definition turns on.
Another common stem contrasts declarative and imperative configuration. When a question asks how a Terraform configuration describes infrastructure, choose the option that says it declares the desired end-state and lets Terraform determine the steps; reject any option describing an ordered list of commands the author sequences by hand, which is the imperative model. A related distractor claims Terraform replaces provider APIs with its own protocol. It does not: it calls those same APIs and adds state tracking and reconciliation on top.
A third pattern asks for a benefit of IaC. Safe answers are the software-engineering ones: version control and history, code review, repeatable and consistent provisioning, and reuse of shared configurations. A distractor often offers a benefit IaC does not claim, such as removing the need for provider APIs or guaranteeing zero cost; match only the benefits that follow from infrastructure being expressed as versioned, declarative code.
Three ways to provision infrastructure
| Aspect | Manual console | Imperative scripts | Declarative IaC (Terraform) |
|---|---|---|---|
| How change is expressed | Point-and-click actions | Ordered commands you write | Desired end-state you declare |
| Who orders the operations | The operator, step by step | The script author, step by step | Terraform, from the dependency graph |
| Reproducibility | Low; hard to repeat exactly | Medium; only what the script covers | High; same config yields the same result |
| Version control and review | None by default | The script is versionable | Configuration is versioned, reviewed, shared |
| Record of real infrastructure | None; lives only in the console | None unless separately coded | State file tracks the managed resources |
Sharp facts the exam loves — give these one last read before exam day.
Cheat sheet
Sharp facts the exam loves — scan these before test day.
- IaC is provisioning via machine-readable config
Infrastructure as Code (IaC) is the practice of managing and provisioning infrastructure through machine-readable configuration files rather than through manual console actions or interactive point-and-click tools.
Trap IaC is not merely a script that automates GUI clicks; the configuration itself codifies the intended infrastructure so it can be versioned and reused.
10 questions test this
- A colleague claims that a screen-recording macro that replays the same sequence of clicks in the cloud console each time already counts as Infrastructure as Code. Which statement best explains the dis
- A colleague asks how Terraform actually represents the infrastructure you manage with it. According to HashiCorp's description of Terraform, in what form do you express those resources?
- An operations team must be able to tear down and rebuild an entire environment on demand and have it return in exactly the same state, without an engineer manually repeating dozens of setup steps each
- A new engineer joins a team that manages its entire cloud environment with Terraform and asks how she can find out exactly what infrastructure the team currently runs. Which property of Infrastructure
- Before any change to their cloud environment takes effect, a team wants a second engineer to review and approve it using the same pull-request process they already use for application code. Which char
- A team wants a reliable, reviewable record of every change to their infrastructure over time, including who changed what and how the environment was defined at any past point. Which characteristic of
- A platform team is describing its shift away from manually configuring servers by clicking through a cloud provider's web console. In the context of Terraform, what does the term Infrastructure as Cod
- A workshop lists several ways a team could stand up infrastructure. Which one actually embodies the core idea of Infrastructure as Code, namely provisioning and managing infrastructure through machine
- A team keeps a detailed wiki page that lists, step by step, every console click and manual command an engineer must perform to build their environment, and they call this page their 'infrastructure as
- A manager assumes Infrastructure as Code is only useful for the first-time build of an environment and that any later changes or teardowns must return to manual console work. How does Infrastructure a
- Terraform is an IaC tool
Terraform is an infrastructure as code tool that lets you build, change, and version cloud and on-prem resources safely and efficiently by defining them in human-readable configuration files.
5 questions test this
- A colleague asks how Terraform actually represents the infrastructure you manage with it. According to HashiCorp's description of Terraform, in what form do you express those resources?
- A team currently manages its cloud environment through ad-hoc API calls and console changes and now wants to adopt a dedicated infrastructure as code tool to define that environment declaratively inst
- During onboarding, a new engineer asks how HashiCorp officially positions Terraform among infrastructure tools. Which statement matches Terraform's own definition of what the tool is and what category
- A team lead points out that Terraform's human-readable configuration files can be treated much like application source code. According to Terraform's description, what does defining resources in these
- An organization runs workloads on two different cloud providers plus some on-prem systems and wants a single tool and workflow to manage all of them. How does Terraform, as an infrastructure as code t
- Terraform config is declarative
Terraform's configuration language is declarative: it describes the desired end-state of your infrastructure rather than the ordered steps to build it, and Terraform determines the operations needed to reach that state.
Trap A Terraform configuration is not an imperative or procedural script that lists commands in execution order.
9 questions test this
- During a review, a new team member argues that a Terraform configuration is essentially a shell script: a top-to-bottom list of commands that Terraform executes in the exact order they appear in order
- While reviewing team documentation, you must select the statement that correctly describes Terraform's declarative configuration model as opposed to an imperative one. Which statement is correct?
- Your operations team currently provisions cloud resources with hand-written scripts that call each cloud provider's SDK directly, firing API requests in a fixed sequence. A colleague claims that adopt
- Before Terraform, your team followed a written runbook: a person clicked through each cloud console and issued API calls in a documented order to stand up an environment. Which characteristic of Terra
- A skeptic on your team insists Terraform adds nothing over calling a cloud provider's API directly from a script, since both ultimately hit the same endpoints. Which capability best demonstrates that
- During onboarding you are asked to summarize, in one sentence, what it means that Terraform's configuration language is declarative. Which statement best captures the declarative model?
- A platform team maintains a staging and a production environment. Historically each was built by running ad-hoc cloud CLI commands, and over time the two environments have drifted apart. They ask how
- You edit an existing configuration to change one instance's machine type and to remove a storage bucket that is no longer needed, then you apply. Because Terraform is declarative, what does it do with
- An engineer applies a Terraform configuration that provisions several cloud resources, and the run completes successfully. Without editing the configuration and without changing any of the infrastruct
- Terraform vs conventional API-driven management
Compared with conventional management that issues one-off imperative API or CLI calls, Terraform describes infrastructure with version-controlled, repeatable configurations that specify the desired state.
Trap Terraform uses provider APIs rather than replacing them with its own protocol, and it is more than a thin wrapper around those APIs because it tracks state and reconciles to the desired state.
5 questions test this
- Your operations team currently provisions cloud resources with hand-written scripts that call each cloud provider's SDK directly, firing API requests in a fixed sequence. A colleague claims that adopt
- Before Terraform, your team followed a written runbook: a person clicked through each cloud console and issued API calls in a documented order to stand up an environment. Which characteristic of Terra
- A skeptic on your team insists Terraform adds nothing over calling a cloud provider's API directly from a script, since both ultimately hit the same endpoints. Which capability best demonstrates that
- A colleague believes that once you adopt Terraform, it stops using the AWS, Azure, or Google Cloud public APIs and instead talks to each platform over a HashiCorp-proprietary channel. How does Terrafo
- A platform team maintains a staging and a production environment. Historically each was built by running ad-hoc cloud CLI commands, and over time the two environments have drifted apart. They ask how
- Manual provisioning is not reproducible
Manual or ad-hoc provisioning (clicking in a console or running undocumented CLI commands) is hard to reproduce, whereas IaC codifies infrastructure so applying the same configuration yields the same result every time.
Trap Undocumented one-off API calls are not IaC just because they use an API; IaC requires codified, versioned, repeatable definitions.
18 questions test this
- During an incident an operator connects directly to a running production server and hand-edits a configuration file to apply a quick fix, without touching any code. Compared with making the change thr
- Last quarter an engineer built an application load balancer entirely by clicking through the cloud provider's web console and kept no record of the steps. The team must now stand up an identical load
- A developer points out that Terraform ultimately calls the very same cloud provider APIs they could invoke by hand, and concludes it therefore offers no reproducibility advantage over just making thos
- A team must stand up a staging environment that is identical to a production environment which was originally assembled by hand through the console. Why does that manual origin make an exact copy hard
- A team keeps hitting 'it worked in development but broke in production' because each environment was built by hand, at a different time, with slightly different settings. How does defining the infrast
- The only engineer who knew how a business-critical environment was built - entirely by clicking through the cloud console - has left the company, and the new hire has no reliable record of how it was
- A team wrote a one-off shell script that fires a series of undocumented cloud provider API calls to create resources, and now claims it is 'doing infrastructure as code' because it drives an API inste
- A team currently manages cloud infrastructure by clicking through consoles and running one-off commands. Which single characteristic most fundamentally distinguishes an infrastructure-as-code approach
- Several engineers on a team need to change shared infrastructure without stepping on each other, and their old habit of each making direct manual changes in the console left no coordinated record. How
- A business-critical server was assembled over two years through countless undocumented manual tweaks, and the operations team is not confident they could rebuild it identically if it were lost. Which
- Two engineers debate why re-running the same Terraform configuration reliably yields the same infrastructure, while re-running a hand-written sequence of manual provisioning steps often does not. Whic
- An engineer argues that because their team provisions infrastructure quickly using the cloud provider's web-console wizards and one-off CLI helper commands, they are 'already doing infrastructure as c
- In the core Terraform workflow of Write, Plan, and Apply, the Apply step is described as provisioning a specific kind of infrastructure that ad-hoc manual provisioning does not deliver. Which characte
- A configuration change is applied and immediately breaks production, and the team wants to return the environment to the exact setup that was running before the change. Why is this reliable with Terra
- A company must roll out the same application stack into fifteen new regions over the next month, and building each one by hand would be slow and would produce subtly different environments. How does a
- An operations lead is frustrated that hand-built servers keep failing because someone mistypes a value or forgets a step during manual provisioning. Which characteristic of an infrastructure-as-code a
- Two teams each build the same type of internal service by hand, and because every engineer sets it up slightly differently, the results are inconsistent and hard to support. Beyond merely writing down
- A QA group needs to create a full test environment several times a week and tear it down afterward, and their current manual rebuilds are slow and never come back quite the same. How does an infrastru
- IaC applies software-engineering practices
Because infrastructure is expressed as code, IaC brings software-engineering practices such as version history, code review, and testing to infrastructure provisioning.