Infrastructure as Code: Make the Change Inspectable

A blueprint notebook corresponds to three server blocks, with a magnifying glass and an offset configuration.
Concept illustration of configuration intent, review, and infrastructure drift.

I completed Infrastructure as Code: The Big Picture by Eugene Meidinger to understand a discipline adjacent to my mobile and backend work. The introductory course gave me a useful frame for a familiar problem: an application depends on configuration that may be harder to inspect than the application code itself.

Using a hypothetical storage-upload feature, I explore how I would review configuration changes and their effect on an application.


The change should have a record

A console setting can be easy to adjust and difficult to explain later. Someone changes a permission or network rule, the immediate issue improves, and the reason disappears into a chat thread.

Infrastructure as Code brings that intended configuration into a versioned artifact. A reviewer can inspect the change, discuss its effects, and connect it to the application’s needs. Versioning preserves the intended configuration and the reasoning behind a change.

A storage upload feature may depend on bucket policy, cross-origin configuration, service identity, and environment variables. Reviewing these alongside the mobile code makes the feature’s assumptions visible.


Declarative describes the result; imperative describes the steps

A declarative approach describes a desired state. An imperative approach specifies operations to perform. Infrastructure automation can use either, and the choice affects how the system handles existing resources and partial failure.

Idempotence means repeating an operation has the same intended effect as performing it once. It is a useful property, but it is not a guarantee that a tool will never replace a resource, lose data, or fail halfway through.

I would also keep provisioning and configuration management distinct when choosing a tool. Creating a cloud resource and configuring software inside a host are related tasks with different responsibilities.


Read the plan as an engineering change

A plan can preview the actions required to align managed resources with configuration. Terraform’s plan documentation describes how it compares configuration and state and proposes changes without applying them.

The review needs to inspect consequences: replacement, deletion, changed access, downtime, and dependency order. “The syntax is valid” is a much narrower statement than “this is safe to apply.”

For an initialized Terraform working directory, an illustrative review sequence is:

terraform fmt -check
terraform validate
terraform plan

Before running these checks, configure the backend, credentials, providers, and target environment. Applying a reviewed plan is a separate step in the deployment procedure.


State deserves its own protection

Terraform uses state to map managed resources to real objects. Its state documentation explains why that mapping is necessary. State needs a storage and access policy appropriate to its contents.

For a collaborative workflow, access control, locking support, backup, and recovery need explicit decisions. HashiCorp’s sensitive data guidance explains that marking a value sensitive can hide it in output while still storing it in state or plan files. Those artifacts should not be committed to a source repository.

I would version the configuration while protecting generated state and plan files according to their contents.


Plan recovery alongside drift detection

Drift is divergence between recorded intent and actual infrastructure. Detecting it gives the team evidence; deciding what to do next requires judgment. An emergency manual change may need to be preserved in code rather than automatically overwritten.

Reverting a commit also does not necessarily restore data or reverse a destructive operation. Recovery may require backups, compatibility work, or a deliberate fix forward. Smaller changes can make the problem easier to reason about, but they do not remove it.


What I want to apply

I would start with one frequently changing, well-understood piece of infrastructure, document its dependencies, and review plans before expanding the scope. The success criterion would be whether another engineer can understand and reproduce the configuration safely.

The course strengthened a principle I already value in application development: a dependable change needs visible intent, clear ownership, and a way to understand failure. Infrastructure makes those requirements especially concrete.