Manual Infrastructure vs Infrastructure as Code
What is infrastructure as code?
Infrastructure as code (IaC) means representing infrastructure settings in files that can be reviewed, versioned and used by tools to manage resources. Manual provisioning means an operator creates or changes those resources directly, for example through a management console. IaC makes the intended configuration easier to share and reproduce, but does not make every environment identical automatically.
Example: two environments
A team builds a test website and a production website. The intended settings are one application server in each environment and private catalog storage. During manual setup, the team forgets to restrict access to the test catalog. The environments now differ in a way the team did not intend. No real account or server is involved in this example.
Describe intent instead of a click sequence
A declarative approach describes what should exist. An imperative approach specifies operations to perform in order. Compare these two paper descriptions of the same goal. Neither is executable Terraform syntax.
Declarative paper specification
- Application servers: 1
- Catalog access: private
Imperative paper procedure
- Create a server.
- Create catalog storage.
- Restrict access to the storage.
The first states an outcome; the second describes steps. Neither ensures the outcome without suitable tools, permissions and checks.
Reviewing a change before it happens
A configuration file can be committed to version control, a system that records file revisions. A teammate can compare the proposed changes with the previous revision and review whether they are intentional. This supports collaboration and accountability. Version control alone does not prove an infrastructure change is safe or that the previous revision can be restored without data loss.
What is configuration drift?
Drift is a difference between the intended managed settings and the observed settings. Suppose the bookshop team intends private storage but someone later changes access outside its IaC workflow. The file has not changed, yet the real setting has. An infrastructure planning operation may reveal a difference when it reads the relevant resource. Investigate the cause before deciding whether to restore the old setting or update the intended configuration.
Repeatability has limits
Even identical files can produce different results if inputs, provider versions, permissions, region capabilities, existing resources or external dependencies differ. Document those dependencies. Test important changes in a controlled environment rather than assuming a file guarantees identical behavior.
When a simpler approach may be enough
For a small one-off experiment that will never need to be repeated, a documented manual action may be sufficient. For shared, changing or repeated infrastructure, IaC can make reviews and maintenance easier. Avoid creating overlapping tools that both claim ownership of the same object.
Practice and next step
A team expects two test servers but finds three after an emergency manual change. Identify the intended setting, observed setting, and drift. Explain why reviewing the extra server’s purpose is safer than immediately removing it. Next, learn how Terraform separates a proposed change from its execution.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Manual Infrastructure vs Infrastructure as Code — knowledge check
Check the mental models and decisions introduced in this lesson.
Which statement best describes infrastructure as code?
The intended server count is two. An operator manually adds a third. What does this illustrate?
Which statement is a declarative description?
Why might identical configuration files produce different infrastructure?
A manual emergency change has added a server. What should the team do first?