Skip to content
Français
Sync not enabled: your progress stays in this browser My learning
Select theme
Français

Practise

Terraform labs

Describing infrastructure and replaying it: the state and its traps, modules that get reused, and environments that do not drift apart.

Back to all 761 labsHow to run a lab

  • 91 labs
  • 82 hours of practice

DSOXLab runs these labs on your machines

DSOXLab is the command-line tool behind every lab on this page. It prepares the environment, hands you the mission and checks the result, so the score comes from the state you actually built.

  1. Prepare It sets up the lab environment: the virtual machines, and the cluster when the lab uses one. dsoxlab start <lab>
  2. Practise You read the mission, then solve it yourself on the system, connecting to the machines when the lab has some. dsoxlab challenge
  3. Check It runs the tests on the state you produced and computes the score. The tests read that state, not the commands you typed. dsoxlab check <lab>
  4. Progress Results are recorded on your machine. If you want them on your account on this site, sign in and push them, when the catalogue allows it. dsoxlab login / dsoxlab push

Install it with uv or pipx. No administrator rights are needed. uv tool install dsoxlab # or: pipx install dsoxlab Start a lab Install DSOXLab The DSOXLab course Source code on GitHub

Kinds of exercise

What you will practise remote state and lockingmodulesenvironmentssensitive dataAWS emulated locallyHCP Terraform

Add this catalogue dsoxlab catalog add https://github.com/stephrobert/terraform-dsoxlab-training every lab played and scored by the author

Discover Terraform

8
  • Prove that Terraform has a memory

    Guided lab beginner 30m shell

    A beginner believes Terraform re-reads the `.tf` files and queries the infrastructure on every command, the state being an accessory cache. Take that idea apart on a purely local configuration: prove a second apply changes nothing, that drift caused outside Terraform is detected without losing the identity of the untouched resources, that data merely read is not a managed resource, and that an object nobody declared stays invisible.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATE

    Command to start it

    dsoxlab start getting-started-terraform-overview

  • Prove idempotence where the imperative script diverges

    Guided lab beginner 30m shell

    A provisioning script is provided, and it diverges as soon as you replay it: a new identifier every time, a report that piles up instead of being replaced. Reach the same result in Terraform, then establish by the plan that a second pass is a non-event, and repair an external drift without touching your code.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATE

    Command to start it

    dsoxlab start getting-started-declarative-vs-imperative

  • Prove Terraform / OpenTofu compatibility, and where it stops

    Guided lab beginner 30m shell

    "The two tools are compatible" is repeated everywhere and checked by nobody. Make a configuration portable by declaring the source and version constraint of every provider, then establish by the structured state that both binaries read the same state, resolve the same versions on two different registries, and that the lock file is exactly where portability stops.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATE

    Command to start it

    dsoxlab start getting-started-terraform-vs-opentofu

  • Pin the CLI version and lock the providers

    Guided lab beginner 30m shell

    Installing the binary proves almost nothing. Constrain the CLI version from the configuration itself, pin the three providers, make an impossible constraint refuse to run, and prove the lock file rules: wipe `.terraform/`, re-init, and the resolved versions must not move.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATE

    Command to start it

    dsoxlab start getting-started-install-terraform

  • Make fmt, validate and the outputs agree

    Guided lab beginner 30m shell

    Three faults are planted: a file outside canonical format, an orphan reference that fails `validate`, and missing outputs. Fix all three without changing what the configuration produces, then prove an expression recomputes outside the state.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATE

    Command to start it

    dsoxlab start getting-started-cli-terraform

  • Read a plan before applying it

    Guided lab beginner 30m shell

    An already applied configuration must change. Before touching anything, say which of its resources will be updated in place and which will be destroyed then recreated. The human-facing plan announces both in the same block of text: the only reliable reading is the actions field of the plan converted to JSON. Then apply exactly the plan you read, from a saved plan file.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATE

    Command to start it

    dsoxlab start getting-started-terraform-workflow

  • What Terraform manages, and what it merely reads

    Guided lab beginner 30m shell

    One word separates the two kinds of block: `resource` creates and manages, `data` reads. Prove it in the `mode` field of state, then observe the two consequences: a `destroy` does not touch what it did not create, and a data source is re-read on every plan.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATE

    Command to start it

    dsoxlab start getting-started-providers-resources-data-sources

  • Split a monolith without moving the plan

    Guided lab beginner 30m shell

    File names have no functional effect: Terraform reads every `.tf` as one document. Split a monolith into six thematic files and prove, by comparing two JSON plans, that nothing changed. Then observe which value source wins.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATE

    Command to start it

    dsoxlab start getting-started-terraform-project-structure

First infrastructures

7
  • First infrastructure: the full cycle, proven

    Guided lab beginner 30m shell

    Run the Terraform cycle on a REAL resource rather than reciting it, and learn on the way that `~> 0.8` does not forbid `0.9.x`: the pessimistic operator increments the rightmost component, and the 0.9 branch rewrote the resource schema.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATE

    Command to start it

    dsoxlab start first-infra-first-infrastructure

  • Variables, locals and the real precedence order

    Guided lab beginner 30m shell

    Four rungs, checked in order: `default`, `TF_VAR_`, `terraform.tfvars`, `*.auto.tfvars`, `-var`. The decisive one is the second: a values file BEATS the environment variable, the rank almost everyone places too high.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATE

    Command to start it

    dsoxlab start first-infra-variables-outputs

  • The dependency Terraform cannot guess

    Guided lab beginner 30m shell

    Terraform builds its graph from the REFERENCES it finds in expressions. Nine times out of ten a hand-written `depends_on` signals a missing reference. This lab is about the tenth: a block that consumes a variable and references nothing, where Terraform is free to act in the wrong order.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATE

    Command to start it

    dsoxlab start first-infra-virtual-network

  • Update in place or replacement: read it in the plan

    Guided lab beginner 30m shell

    On a virtual machine, some attributes change in place and others destroy then recreate the machine. The plan says which, before the apply, provided you know where to look. Then verify the plan told the truth, by applying it.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATE

    Command to start it

    dsoxlab start first-infra-vm-libvirt

  • Produce an Ansible inventory from the state

    Guided lab beginner 30m shell

    Terraform knows what it created; Ansible must know it too. Build the bridge, and make it RELIABLE rather than merely functional: a typed variable, addresses computed by an HCL function, a serialised file, and an inventory that disappears with the fleet it describes.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATE

    Command to start it

    dsoxlab start first-infra-ansible

  • Resume after a failed apply, without redoing the work

    Guided lab beginner 30m shell

    An apply that fails halfway leaves a PARTIAL state. It is not an accident to wipe: it is the starting point of the repair. Fix the cause in the configuration, and prove the already created resources kept their identifiers.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATE

    Command to start it

    dsoxlab start first-infra-debug-apply

  • Destroying cleanly, and the four things it covers

    Guided lab beginner 30m shell

    Destroying is not one operation. Observe four that do not resemble each other: the global destroy a guard can REFUSE, the targeted destroy, the removal of a resource FROM THE CODE, and the full destroy that empties the state without deleting its file.

    Graded on the state of the system attested 25 Sept 2026

    Open the guide (French) TF-ASSOCIATE

    Command to start it

    dsoxlab start first-infra-clean-destroy

Writing Terraform code

24
  • Explicit source and provider alias

    Guided lab intermediate 35m shell

    Declare providers correctly: an explicit source address that resolves to registry.terraform.io/hashicorp/random, a second configuration of the same provider distinguished by an alias, and a resource wired to it with provider =. Proven by version -json and the plan JSON provider_config. Associate 5b.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATETF-PROFESSIONAL

    Command to start it

    dsoxlab start write-code-providers

  • Read a resource's lifecycle in the plan

    Guided lab intermediate 45m shell

    Build four resources ordered only by references, then prove in the plan JSON the four lifecycle operations: update in place, replace, create before destroy, and destroy. Pro objective 1c.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATETF-PROFESSIONAL

    Command to start it

    dsoxlab start write-code-declare-resources

  • Variables typing, validation and precedence

    Guided lab intermediate 45m shell

    Type variables correctly and master their traps: a map of objects with optional() defaults, a validation rule that rejects before any provider, an explicit null that falls back to the default with nullable=false, the real source precedence (auto.tfvars over TF_VAR_, -var above all), and sensitive as a display mask, not a state protection. Associate 2e plus 2f.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATETF-PROFESSIONAL

    Command to start it

    dsoxlab start write-code-variables

  • The secret the output does not hide

    Guided lab intermediate 45m shell

    Master the real output block: a type constraint (object), sensitivity propagation (an output referencing a secret must be sensitive, and sensitive is only a display mask, cleartext stays in state, -json and -raw), nonsensitive() to expose a hash deliberately, and a precondition that fails the plan. Associate 2e plus 2f.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATETF-PROFESSIONAL

    Command to start it

    dsoxlab start write-code-outputs

  • The local that is not resolved at plan time

    Guided lab intermediate 45m shell

    Centralize expressions in locals blocks: normalize with HCL functions, keep a ternary typed, generate a list with a for expression, derive from a resource attribute (known after apply), and inherit a variable's sensitivity. Pro objective 2c.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATETF-PROFESSIONAL

    Command to start it

    dsoxlab start write-code-locals

  • When exactly does Terraform read a data source?

    Guided lab intermediate 45m shell

    Build three data sources whose read timing is deliberate: one read during the plan, one deferred to the apply because the resource it depends on is changing, and one carrying an explicit depends_on that does NOT defer it. Prove each case in the plan JSON. Pro objective 2b.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATETF-PROFESSIONAL

    Command to start it

    dsoxlab start write-code-data-sources

  • What expressions really compute

    Guided lab intermediate 30m shell

    Write correct Terraform expressions: reference a managed resource with no prefix, know that == does not convert types (so 3 is not "3") while arithmetic does, respect operator precedence, and use null to omit an argument rather than an empty string. Associate 2e.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATETF-PROFESSIONAL

    Command to start it

    dsoxlab start write-code-expressions

  • Compose values with HCL functions

    Guided lab intermediate 45m shell

    Deduplicate a collection for for_each, handle out-of-range element(), lookup() fallback, ceil() rounding, template escaping and a provider-defined function. Pro objective 2c.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATETF-PROFESSIONAL

    Command to start it

    dsoxlab start write-code-functions

  • Provider-defined functions

    Guided lab intermediate 30m shell

    Use functions exposed by a provider with the provider:: syntax. Pro objectives 2c and 5a.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-PROFESSIONAL

    Command to start it

    dsoxlab start write-code-provider-defined-functions

  • The configuration that refuses absurd values

    Guided lab intermediate 45m shell

    Compute values with conditional expressions, then place each guard at the right level: validation, precondition, postcondition and check block. Pro objective 2a.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATETF-PROFESSIONAL

    Command to start it

    dsoxlab start write-code-conditionals

  • Custom conditions: precondition, postcondition and check blocks

    Guided lab intermediate 30m shell

    Validate a configuration with the language features designed for it. Pro objective 2a.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATETF-PROFESSIONAL

    Command to start it

    dsoxlab start write-code-validation-check-preconditions

  • count indexes by position, and the position lies

    Guided lab intermediate 45m shell

    Choose count or for_each per resource and prove it: index a set by name with for_each, migrate a count resource to for_each with no destroy using moved blocks, keep count for interchangeable copies, and expose a conditional resource with one(). Associate objective 4b plus the Professional moved migration.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATETF-PROFESSIONAL

    Command to start it

    dsoxlab start write-code-count

  • Add an instance without destroying the others

    Guided lab intermediate 45m shell

    Migrate count to for_each with moved blocks on an already applied configuration, then add a service proving zero destruction. Pro objective 2d.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATETF-PROFESSIONAL

    Command to start it

    dsoxlab start write-code-for-each

  • Transform a catalog with for expressions

    Guided lab intermediate 45m shell

    Derive four collections from a single map of servers with for expressions: a filtered tuple, an object grouped by role with the ellipsis, a flattened two-level cross, and a filtered for_each. Avoid the splat-on-a-map trap. Pro objective 2c.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATETF-PROFESSIONAL

    Command to start it

    dsoxlab start write-code-for-loops

  • Generate blocks, and know when not to

    Guided lab intermediate 45m shell

    Generate cloudinit parts with a dynamic block filtered in for_each and named from the key, keep the fixed part literal, and hit the wall: a lifecycle meta-argument block cannot be generated by dynamic. Pro objective 2d.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATETF-PROFESSIONAL

    Command to start it

    dsoxlab start write-code-dynamic-blocks

  • depends_on belongs only where a reference cannot go

    Guided lab intermediate 45m shell

    Remove a redundant depends_on that a reference already covers, replace a hardcoded path with a reference, keep the one depends_on nothing else can express, and prove the graph in the plan JSON. Pro objective 2d.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATETF-PROFESSIONAL

    Command to start it

    dsoxlab start write-code-depends-on

  • The lifecycle block decides the order, not you

    Guided lab intermediate 45m shell

    Set create_before_destroy and watch its propagation go down to dependencies, hit the documented limit of prevent_destroy, scope ignore_changes to a single attribute, trigger a replacement from a bare value through terraform_data, and reject an invalid input at plan time. Pro objective 2d.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATETF-PROFESSIONAL

    Command to start it

    dsoxlab start write-code-lifecycle

  • The typo that breaks nothing

    Guided lab intermediate 25m shell

    Two tfvars traps: an undeclared variable in a .tfvars is only a warning, so the real variable silently stays at its default (fix the typo), and terraform.tfvars.json outranks terraform.tfvars (a distinct precedence level). Associate 3c.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATETF-PROFESSIONAL

    Command to start it

    dsoxlab start write-code-tfvars-files

  • Version constraints and the lock file

    Guided lab intermediate 30m shell

    Write correct version constraints: a literal required_version (the terraform block accepts no variable), an exact provider pin that resolves to that version, and the pessimistic ~> that allows 3.x but not 4.0. Proven by version -json and the h1 hashes of the lock file. Associate 3a.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATETF-PROFESSIONAL

    Command to start it

    dsoxlab start write-code-version-constraints

  • The config that works but no CI accepts

    Guided lab intermediate 40m shell

    Take a working but non-conforming config and make it CI-ready: pass terraform fmt, fix the orphan reference that breaks validate, rename resources to snake_case, type and describe variables and outputs, mark the token sensitive, type the number output (1.15), and write a .gitignore that excludes state but keeps the lock file. Associate 2a plus 2e.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATETF-PROFESSIONAL

    Command to start it

    dsoxlab start write-code-style-guide

  • When sensitivity breaks for_each

    Guided lab intermediate 30m shell

    A side effect of sensitive rarely taught: a sensitive value cannot be a for_each key (Invalid for_each argument), so you must iterate over a non-sensitive set. The contaminated resource attribute is flagged in sensitive_values, and a hash is exposed with nonsensitive(). Professional 2f.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATETF-PROFESSIONAL

    Command to start it

    dsoxlab start write-code-sensitive-data-sensitive-values

  • The value that never touches the state

    Guided lab intermediate 35m shell

    Declare an ephemeral value that is generated during the run but never written to the state or plan: the ephemeral block (random 3.7+), the contrast with a persisted random_password, exposing it safely at the root with ephemeralasnull(), and the two errors it triggers when leaked. Professional 2f.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATETF-PROFESSIONAL

    Command to start it

    dsoxlab start write-code-sensitive-data-ephemeral-values

  • Write-only arguments: a secret that never lands in the state

    Guided lab intermediate 30m shell

    Send a secret to the provider without ever persisting it in the Terraform state, using write-only arguments against a local AWS emulator.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATETF-PROFESSIONAL

    Command to start it

    dsoxlab start write-code-sensitive-data-write-only-arguments

  • Read secrets from Vault

    Guided lab intermediate 30m shell

    Fetch secrets from HashiCorp Vault with the vault provider and consume them without freezing them in clear text in the state. Pro objective 2f.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-PROFESSIONAL

    Command to start it

    dsoxlab start write-code-sensitive-data-vault-secrets

Terraform state

10
  • Take over a secret already in service, without regenerating it

    Guided lab intermediate 30m shell

    A plain `apply` would draw a new password. Attach the existing one through an `import` block, then observe that the secret sits in clear text in the state while being marked `sensitive_attributes`: masking is a display, not encryption.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATETF-PROFESSIONAL

    Command to start it

    dsoxlab start state-understand-state

  • Migrate the state without breaking its lineage

    Guided lab intermediate 30m shell

    A backend block accepts no named value. Move from an implicit local backend to a parameterised one through partial configuration and `-backend-config`, and prove the state migrated rather than being recreated: same `lineage`, both resources still managed.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATETF-PROFESSIONAL

    Command to start it

    dsoxlab start state-backends

  • State locking, what it really blocks

    Guided lab intermediate 30m shell

    Measure the exact scope of the state lock on a local backend, and state what enables it on S3.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATETF-PROFESSIONAL

    Command to start it

    dsoxlab start state-state-locking

  • terraform state list, the address is the identity

    Guided lab intermediate 30m shell

    Find the address of an instance when all you know is its real identifier, and count managed resources without being caught by a module.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATETF-PROFESSIONAL

    Command to start it

    dsoxlab start state-terraform-state-list

  • terraform state show, and what the summary hides

    Guided lab intermediate 30m shell

    Extraire du state une valeur sensible et des attributs nuls, que la sortie humaine de state show caviarde ou omet.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATETF-PROFESSIONAL

    Command to start it

    dsoxlab start state-terraform-state-show

  • terraform state mv and the moved block, refactor without destroying

    Guided lab intermediate 30m shell

    Reattach three existing objects to their new addresses, imperatively then declaratively, and prove nothing was recreated.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATETF-PROFESSIONAL

    Command to start it

    dsoxlab start state-terraform-state-mv

  • terraform state rm and the removed block, stop managing without destroying

    Guided lab intermediate 30m shell

    Take two resources out of the state without deleting the files, and learn why a removed block destroys unless you write destroy = false.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATETF-PROFESSIONAL

    Command to start it

    dsoxlab start state-terraform-state-rm

  • The removed block: bequeath an infrastructure without destroying it

    Guided lab intermediate 40m shell

    Take resources out of the state deciding for each whether the real object survives, and find where the removed block gives up. Pro objectives 1e and 4c.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-PROFESSIONAL

    Command to start it

    dsoxlab start state-removed-block

  • Restore an amputated state: pick the right backup, prove nothing was recreated

    Guided lab intermediate 40m shell

    A state rm went wrong and the backup was overwritten. Three candidate backups, one restorable, compared by lineage and serial, then pushed without touching the real files.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATETF-PROFESSIONAL

    Command to start it

    dsoxlab start state-backup-restore-state

  • Diagnose a drift and adopt an orphan resource, without losing its value

    Guided lab intermediate 40m shell

    Prove a drift with a saved refresh-only plan, reconcile it, then adopt a pre-existing token with an import block, without Terraform regenerating it.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATETF-PROFESSIONAL

    Command to start it

    dsoxlab start state-diagnose-state

Terraform modules

9
  • A reusable module configures no provider of its own

    Guided lab intermediate 45m shell

    Empty a child module of its provider configuration, have it declare the aliased configuration it expects, pass that configuration from the root, and instantiate the module three times with a single for_each.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATETF-PROFESSIONAL

    Command to start it

    dsoxlab start modules-create-modules

  • Refactor a monolith into the standard module structure

    Guided lab intermediate 45m shell

    Split a single .tf file into the official layout, add a nested module called by relative path, a standalone example, and prove that override.tf is the one file name with a functional effect.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATETF-PROFESSIONAL

    Command to start it

    dsoxlab start modules-module-structure

  • A module interface is a contract, not just types

    Guided lab intermediate 45m shell

    Make an object attribute optional, refuse an explicit null, reject an out-of-range value, gate an output behind a precondition, and re-export a secret without breaking the plan.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATETF-PROFESSIONAL

    Command to start it

    dsoxlab start modules-module-variables-outputs

  • A local module is read in place, not installed

    Guided lab intermediate 45m shell

    Wire two root projects onto one shared local module, and prove from modules.json which folder each call really reads: relative path versus absolute path.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATETF-PROFESSIONAL

    Command to start it

    dsoxlab start modules-module-local

  • A registry module is downloaded, versioned, and never locked

    Guided lab intermediate 45m shell

    Pin a registry module, resolve a flexible constraint, and prove from modules.json and the plan JSON which version got installed: the lock file never covers a module.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATETF-PROFESSIONAL

    Command to start it

    dsoxlab start modules-module-registry

  • Publish and consume module versions with Git tags

    Guided lab intermediate 45m shell

    Publish three versions of a shared module, then consume them from three projects: an immutable reference, a minor tag and a major tag, with no version argument in sight.

    Graded on the state of the system attested 25 Sept 2026

    Open the guide (French) TF-ASSOCIATETF-PROFESSIONAL

    Command to start it

    dsoxlab start modules-version-modules

  • Prove a module with terraform test, mutations included

    Guided lab intermediate 45m shell

    Write the .tftest.hcl suite of a module, covering its default, its options and its refusal of an invalid input: every behaviour is checked by mutating the module.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATETF-PROFESSIONAL

    Command to start it

    dsoxlab start modules-test-module

  • Make a module composable, and prove it from the plan JSON

    Guided lab intermediate 45m shell

    Strip a legacy module of its own provider configuration, invert its dependency and document it, then read the proof in provider_config and module_calls.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATETF-PROFESSIONAL

    Command to start it

    dsoxlab start modules-module-best-practices

  • Refactor a copy-pasted project without destroying anything

    Guided lab intermediate 45m shell

    Extract two copy-pasted resources into a typed module called once, and prove from the state identifiers that nothing was destroyed on the way.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATETF-PROFESSIONAL

    Command to start it

    dsoxlab start modules-module-anti-patterns

Environments

7
  • Split a monolithic configuration, and prove the plan did not move

    Guided lab advanced 40m shell

    Split an eighty-line main.tf into the official file layout, then prove by comparing two plans that nothing changed: a green validate proves nothing here.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-PROFESSIONAL

    Command to start it

    dsoxlab start environments-organize-terraform-repo

  • Two roots, two states, one shared module

    Guided lab advanced 45m shell

    Wire two root configurations onto one shared module with a partial backend, then prove by destroying dev that prod never moved.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-PROFESSIONAL

    Command to start it

    dsoxlab start environments-separate-environments

  • Which value wins, and how to prove it

    Guided lab advanced 45m shell

    Serve three environments from one configuration, restore the guard rail a stray terraform.tfvars had silenced, and prove which source wins from the plan JSON.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATE

    Command to start it

    dsoxlab start environments-per-environment-variables

  • One directory, three states that never see each other

    Guided lab advanced 45m shell

    Drive three state instances from a single configuration through terraform.workspace, then retire an inherited workspace without leaving an orphan behind.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATE

    Command to start it

    dsoxlab start environments-workspace

  • Workspaces or separate configurations, and what the split costs

    Guided lab advanced 50m shell

    Decide which parts still belong in workspaces, split the rest into two root configurations, and wire their dependency through terraform_remote_state without duplicating a value.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-PROFESSIONAL

    Command to start it

    dsoxlab start environments-when-to-use-workspaces

  • Split a monorepo into two stacks that talk to each other

    Guided lab advanced 45m shell

    Re-export a nested module output at the root, consume it from a downstream stack through terraform_remote_state, and keep the platform secret out of the shared state.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-PROFESSIONAL

    Command to start it

    dsoxlab start environments-monorepo-vs-repo-per-stack

  • Run Terraform in automation (CI/CD)

    Guided lab advanced 30m shell

    Build a non-interactive Terraform chain judged on exit codes alone, then record what a saved plan really freezes, what a lock does, and where a secret leaks.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-PROFESSIONAL

    Command to start it

    dsoxlab start environments-terraform-in-automation

Terraform on AWS, via Floci

6
  • AWS provider: authentication, endpoints and default tags

    Guided lab intermediate 40m shell

    Configure a pinned AWS provider so it authenticates against a local API emulator, then prove the instance really runs.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATE

    Command to start it

    dsoxlab start aws-provider-aws-first-ec2

  • Security group: dedicated rules, for_each and a deterministic subnet

    Guided lab intermediate 45m shell

    Build a security group whose rules are all dedicated resources, factor the ingress rules with for_each, and place an instance in a subnet designated by its tag.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATE

    Command to start it

    dsoxlab start aws-sg-subnet-instance

  • Compose the IAM chain, and name its two policies correctly

    Guided lab advanced 30m shell

    `aws_iam_policy_document` is a LOCAL data source: it queries nothing, it builds JSON. Compose the policy, role, instance profile and instance chain, and prove in the structured state that the trust policy and the permissions take two distinct paths to the role.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-PROFESSIONAL

    Command to start it

    dsoxlab start aws-iam-role-policy-instance-profile

  • A remote state, locked, and read by another stack

    Guided lab advanced 50m shell

    Repair a trapped backend block, make the S3 lock actually effective, and have a second configuration consume the outputs without copying a single value.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-PROFESSIONAL

    Command to start it

    dsoxlab start aws-backend-s3-remote-state

  • Read a replacement in the plan, before it happens

    Guided lab advanced 30m shell

    An ASG referencing `version = "$Latest"` never triggers an instance refresh, and a `create_before_destroy` placed on the launch template protects nothing. Read both truths in the plan converted to JSON, without ever calling AWS.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-PROFESSIONAL

    Command to start it

    dsoxlab start aws-launch-template-autoscaling

  • Import, moved and drift: the three traps a tutorial never shows

    Guided lab advanced 30m shell

    Bring an EC2 instance created outside Terraform under its control, change its logical address without the real object being recreated, then reconcile a drift by ACCEPTING reality rather than overwriting it.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-PROFESSIONAL

    Command to start it

    dsoxlab start aws-import-moved-drift

HCP Terraform

8
  • The run workflow: played in two steps, then qualified

    Guided lab advanced 35m shell

    A run is a plan, then an apply of THAT plan. Reproduce it locally with saved plans, see what a stale plan and a frozen variable refuse, then qualify six described runs and put the eleven stages back in the order the documentation gives.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-PROFESSIONAL

    Command to start it

    dsoxlab start hcp-terraform-hcp-terraform-overview

  • Workspaces: one word, two meanings, two attachment strategies

    Guided lab advanced 30m shell

    A CLI workspace is one more state in the same directory; an HCP Terraform workspace is a unit of execution with its own variables, permissions and history. Repair two `cloud` blocks, attach one by name and the other by tags, and establish what `terraform validate` does not catch.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-PROFESSIONAL

    Command to start it

    dsoxlab start hcp-terraform-hcp-workspaces

  • The stream a run sends back, and the three ways to start one

    Guided lab advanced 35m shell

    What a CLI receives from a remote run is the structured stream `terraform apply -json` also produces locally. Record it, analyse it in HCL, two `change_summary` messages, only one of which says what happened, and establish what each of the three workflows allows.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-PROFESSIONAL

    Command to start it

    dsoxlab start hcp-terraform-remote-runs

  • Fifteen precedence levels, and one inversion

    Guided lab advanced 30m shell

    Among priority variable sets the broadest scope wins, whereas among normal sets it is the narrowest. Build the complete fifteen-level table, then resolve cases the tests generate and that no case-by-case answer can handle.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-PROFESSIONAL

    Command to start it

    dsoxlab start hcp-terraform-variable-sets

  • Credentials: neither in the code, nor in the state

    Guided lab advanced 35m shell

    `sensitive` hides a value from the screen, and the state holds it in clear text all the same. Take the provider's keys out of the configuration, replace a token carried in a tag with its fingerprint, and establish how dynamic credentials work.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-PROFESSIONAL

    Command to start it

    dsoxlab start hcp-terraform-shared-credentials

  • Permissions add up, they do not override

    Guided lab advanced 30m shell

    A permission set at the organization level can beat one set on the workspace, and the reverse is also true: the most permissive wins, never the most specific. Write the rule that computes six teams' effective access, and establish two scales that are not the same.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-PROFESSIONAL

    Command to start it

    dsoxlab start hcp-terraform-projects-teams

  • Policy as code: what blocks a run, and who can override it

    Guided lab advanced 30m shell

    A `hard-mandatory` is not unbypassable: the policy set setting decides, crossed with the user's permission. Qualify seven runs, establish the levels of the three frameworks, and write a rule that refuses a non-compliant plan and accepts the compliant one.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-PROFESSIONAL

    Command to start it

    dsoxlab start hcp-terraform-policy-as-code

  • The first remote run, for real (optional, needs an account)

    Guided lab advanced 45m shell

    The only lab in the catalog that needs an HCP Terraform account. Provision the platform with the `tfe` provider, project, workspace, settings, a sensitive variable, attach a configuration with a `cloud` block, and watch a run execute on HashiCorp's infrastructure.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-PROFESSIONAL

    Command to start it

    dsoxlab start hcp-terraform-premier-run-distant

Associate certification (004)

2
  • The commands the exam expects, done rather than recited

    Guided lab advanced 30m shell

    Eight gestures a candidate must be able to perform: `validate`, `fmt`, the precedence cascade, `moved`, `import`, `removed` without destroying, `-replace`, and what `sensitive` really protects. Exit codes are recorded as they happen: they cannot be reconstructed afterwards.

    Graded on the state of the system attested 12 Oct 2026

    Open the guide (French) TF-ASSOCIATE

    Command to start it

    dsoxlab start certifications-associate-essential-commands

  • Associate 004: mock exam

    Capstone advanced 4h shell

    Associate 004 mock exam, validated by pytest.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-ASSOCIATE

    Command to start it

    dsoxlab start certifications-associate-mock-004

Professional certification

7
  • Pro · Objective 1: resource lifecycle, import and drift reconciliation

    Capstone advanced 4h shell

    Import into state an EC2 instance created outside Terraform (aws cli on Floci), then detect and reconcile a drift. Exam objective 1.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-PROFESSIONAL

    Command to start it

    dsoxlab start certifications-professional-capstone1-resource-lifecycle

  • Pro · Objective 2: dynamic configuration and troubleshooting

    Capstone advanced 4h shell

    Data sources, HCL functions, meta-arguments (count/for_each/dynamic), complex types, sensitive data and Vault. Exam objective 2.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-PROFESSIONAL

    Command to start it

    dsoxlab start certifications-professional-capstone2-dynamic-config

  • Pro · Objective 3: collaborative workflows

    Capstone advanced 4h shell

    Remote state (S3 backend on Floci), version constraints, workflow in automation and data sharing via terraform_remote_state. Exam objective 3.

    Graded on the state of the system attested 12 Oct 2026

    Open the guide (French) TF-PROFESSIONAL

    Command to start it

    dsoxlab start certifications-professional-capstone3-collaborative-workflows

  • Pro · Objective 4: create, maintain and use modules

    Capstone advanced 4h shell

    Create a module, consume it, refactor and version it; refactor a flat configuration into modules. Exam objective 4.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-PROFESSIONAL

    Command to start it

    dsoxlab start certifications-professional-capstone4-modules

  • Pro · Objective 5: configure and use providers

    Capstone advanced 4h shell

    Plugin architecture, aliasing, versioning/sourcing/upgrades, authentication and provider error troubleshooting (on Floci). Exam objective 5.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-PROFESSIONAL

    Command to start it

    dsoxlab start certifications-professional-capstone5-providers

  • Pro · Objective 6: HCP Terraform, where the sub-objectives cross

    Challenge advanced 45m shell

    Objective 6 is assessed by multiple choice, and needs no account. Six situations that each cross two sub-objectives, a `cloud` block to write, and a secret that must not reach the state. Six situations, six different outcomes: no constant answer passes.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-PROFESSIONAL

    Command to start it

    dsoxlab start certifications-professional-capstone6-hcp

  • Pro · Integrative mock exam: the six objectives in one sitting

    Capstone advanced 4h shell

    A rehearsal, not a lesson: six tasks, one per objective, to be played in one go once the six capstones are done. Drift reconciliation, dynamic configuration, two states that talk, a module that recreates nothing, two configurations of one provider, and a twelve-question HCP paper scored per sub-objective.

    Graded on the state of the system attested 1 Dec 2026

    Open the guide (French) TF-PROFESSIONAL

    Command to start it

    dsoxlab start certifications-professional-mock-pro

Level exams

3
  • Level A exam: write and provision a demo environment

    Capstone intermediate 45m shell

    A product team needs a demo environment described by a machine catalog. Write the Terraform that builds it on libvirt, lets it evolve without breakage, protects the critical machine and delivers an application secret that never lands in the state. Graded on the real state.

    Graded on the state of the system attested 9 Oct 2026

    Open the guide (French)

    Command to start it

    dsoxlab start level-exams-write-provision

  • Level B exam: take over the operation of a platform

    Capstone advanced 1h30 shell

    A platform in service has suffered an incident overnight. Put production back on its feet without recreating any machine, separate dev from prod, and ship a delivery chain that runs without a human. Graded on the real state.

    Graded on the state of the system attested 24 Nov 2026

    Open the guide (French)

    Command to start it

    dsoxlab start level-exams-operate-state

  • Level C exam: turn copy-pasted code into a versioned module

    Capstone advanced 2h shell

    Two teams copy-pasted the same machine configuration. Turn it into a tested module published in a local Git repository, release a minor then a major version, and have both teams consume it, one pinned to content, the other following releases, without recreating the machines already in service. Graded on the real state.

    Graded on the state of the system attested 9 Oct 2026

    Open the guide (French)

    Command to start it

    dsoxlab start level-exams-modularize