TOPIC 27/3716 MINNOT STARTED

Testing infrastructure as code and configuration

The setup of a server can live in a file. Check that file like code: read it, run rules on it, preview its changes, try it in a test place and look for drift.

L1–L4 are part of the Pro pass

L0 Explain simply

Analogy: tasting the recipe before the party. A cook writes a recipe card for a big dinner. A friend reads the card first. She sees "two cups of salt" and asks, "Did you mean two spoons?" The slip is caught before anyone eats.

Daily List is a to-do list app. Leo is a developer. He keeps the setup of its servers in a text file, not in a pile of clicks. A tool reads the file and builds the servers. Tom, the tester, reads the file and the tool's preview before anything is built.

This is : describing servers, networks and settings in files that a tool reads and builds. Testing it means checking the file, the preview and the result, as you would check any other code.

The picture has limits. A recipe card cannot change a dinner that was already eaten. A setup file can change servers that real people use right now, so a slip costs more.

(SYNTHETIC / TRAINING ONLY: Daily List and every person named in this lesson are invented.)

PICTURE IT

The picture is the one the lesson above opens with. The table below shows how each part of it matches the software.

THE REAL JOB Checking a server setup file, its and its result before real users are affected.

  1. Read the file
  2. Run the rules
  3. Read the preview
  4. Try it in a test place
  5. Compare with what runs
Read, rule, preview, try, compare

HOW THE PICTURE MAPS

How each part of the picture matches the software
In the pictureIn the software
The recipe cardThe setup file
A friend reading the cardA static check and a review
Asking about two cups of saltQuestioning a delete in the change preview
A trial batch in a small panA build in a throwaway test place
The dinner that no longer matches the cardConfiguration drift

WHERE THIS PICTURE STOPS

  • A recipe card cannot change a dinner already eaten. A setup file can change live servers.
  • A cook tastes by mouth. A tool cannot taste, so tests must say what good looks like.
  • A card is read once before cooking. A setup file is applied again and again, so it must be safe to repeat.

HOOK

Read, rule, preview, try, compare.

REMEMBER IT THIS WAY

A story beat: one picture-line that carries the order or the cause.

Tom reads the and spots a delete nobody mentioned. Like the friend asking about two cups of salt, he asks before anything is built.

What each part of the trick stands for
In the trickWhat it stands for
Previewthe tool's preview, read before anything is built
Deletequestioning a delete in the change preview

Not every slip stands out in a preview, so a build in a throwaway test place is still needed.

TELL A FRIEND

Reading a recipe card with a friend before the party, so the salt slip is caught.

OFTEN MIXED UP WITH Containers as disposable test environments. The container lesson is about packing an app and its needs into a box. This lesson is about checking the file that builds the places those boxes run in.

PRACTISE AND KEEP

Sources for this topic — 10 sources
  1. Market practice

    Command: plan (HashiCorp Terraform documentation) ↗ — HashiCorp · The plan command creates an execution plan so you can preview changes before applying; it reads current state, compares it with the configuration and proposes change actions (v1.5.x docs; search excerpt, page not opened)

    Says the plan command creates an execution plan that previews changes without carrying them out, by reading current state, comparing it with the configuration and proposing change actions. Vendor documentation for one tool; used here only to show what a change preview is. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Terraform CLI v1.5.x documentation. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  2. Market practice

    Mocking in Terraform tests (HashiCorp Terraform documentation) ↗ — HashiCorp · Terraform tests can mock providers, so parts of a module are tested without creating real infrastructure or needing credentials (v1.7.0 and later; search excerpt, page not opened)

    Says tests can mock providers, resources and data sources so parts of a module are tested without creating infrastructure or needing credentials. Vendor documentation for one tool. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Terraform language documentation, v1.12.x page (mocking available from v1.7.0). Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  3. Market practice

    How to test infrastructure as code (Pulumi blog) ↗ — Pulumi · Describes layers of infrastructure tests: unit tests with mocked cloud providers, integration tests on a real deployment, and policy as code run at preview and deploy (search excerpt, page not opened)

    Describes layers of infrastructure tests: unit tests with mocked cloud providers, integration tests on a real deployment, and policy as code. Vendor blog; practitioner guidance, not a standard. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web article, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  4. Market practice

    What is infrastructure drift (Pulumi) ↗ — Pulumi · Infrastructure drift is the gap between what code declares and what is running, found by comparing the two (search excerpt, page not opened)

    Describes infrastructure drift as the gap between what code declares and what is running. Vendor glossary page. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  5. Market practice

    Infrastructure as code and configuration drift (InfoQ) ↗ — InfoQ · Describes drift as the gap between what infrastructure code says and what is running, and argues that finding it must be automatic (search excerpt, page not opened)

    Describes drift as the gap between what infrastructure code says and what is running, and argues that finding it must be automatic. Practitioner article, not a standard. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web article, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  6. Market practice

    ISTQB Certified Tester Advanced Level Test Automation Engineering (CTAL-TAE) v2.0, certification page ↗ — International Software Testing Qualifications Board (ISTQB) · Mirror copy of the publisher PDF (ISTQB syllabus CTAL-TAE v2.0, 3 May 2024), version checked against the document's own front matter, read in full text: chapter 5 is titled Implementation and Deployment Strategies for Test Automation: TAE-5.1.1 (K3) apply test automation at different test levels within pipelines, TAE-5.1.2 (K2) configuration management for testware, TAE-5.1.3 (K2) dependencies for an API infrastructure

    Says the syllabus has a preparing-for-automation chapter with an evaluation process for choosing tools. Named as a public overview page only. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Version 2.0. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  7. Market practice

    Dev/prod parity (The Twelve-Factor App) ↗ — Adam Wiggins · Keep the gap between development and production small (search excerpt, page not opened)

    Says to keep the time, personnel and tools gaps between development and production small. Practitioner guidance, not a standard. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  8. Market practice

    Terraform plan command — current reference ↗ — HashiCorp · Current plan Introduction/speculative plans; preview proposal, not execution guarantee. Opened6 November 2026.

    Current plan command reference, Introduction and speculative-plan discussion. Plans propose actions; remote changes may affect execution. The historical v1.5.x source remains separate. · Checked 2026-11-06

    Publisher primary source opened and relevant sections read on 6 November 2026 for the Agile/DevOps domain analysis. Original explanations are used; no extensive source text is copied.

  9. Market practice

    Terraform apply — errors during apply ↗ — HashiCorp · Errors during apply, opened 6 November 2026; partial success may precede failure.

    Current apply tutorial, Errors during apply: apply can fail after some resource changes succeeded; no universal automatic rollback guarantee. · Checked 2026-11-06

    Publisher primary source opened and relevant sections read on 6 November 2026 for the Agile/DevOps domain analysis. Original explanations are used; no extensive source text is copied.

  10. Market practice

    Manage sensitive data in Terraform ↗ — HashiCorp · Sensitive-value persistence and version/provider constraints; opened 6 November 2026.

    Current sensitive-data reference: sensitive hides ordinary display but persists values in state/plan. Ephemeral values require Terraform 1.10+, write-only arguments1.11+ and appropriate provider support. · Checked 2026-11-06

    Publisher primary source opened and relevant sections read on 6 November 2026 for the Agile/DevOps domain analysis. Original explanations are used; no extensive source text is copied.

Deepest material on this page: L4 — Standards & sources. Where a topic stops short of implementation depth, that is a deliberate coverage decision, not an oversight — see coverage.