Dit deel is nog niet vertaald. Je ziet de Engelse tekst.
$ als gewone gebruiker# als root (of met sudo)
Workflow and fundamentals
Commands and what they do.
| Question | Short answer |
|---|---|
| Which command downloads providers? | terraform init — lesson |
| Which file pins the exact provider versions? | .terraform.lock.hcl — commit it — lesson |
~> 4.20 allows which versions? | 4.20 and newer 4.x, not 5.0 — lesson |
| Use a second Azure subscription in one config | A provider block with alias, provider = azurerm.dr — lesson |
| Check the style in CI without changing files | terraform fmt -check — lesson |
| Apply exactly the reviewed plan | plan -out=tfplan, then apply tfplan — lesson |
Configuration
Blocks, types, expressions, conditions and secrets.
| Question | Short answer |
|---|---|
| Read an existing resource group without managing it | data "azurerm_resource_group" — lesson |
Which variable value wins: tfvars or -var? | -var on the command line — lesson |
| One subnet per map entry, stable addresses | for_each — lesson |
| Repeat NSG rule blocks from a list | dynamic "security_rule" — lesson |
| Never let Terraform delete the database | lifecycle { prevent_destroy = true } — lesson |
| Warn (not fail) when a health URL is down | A check block — lesson |
Does sensitive = true encrypt the state? | No, it only hides output — lesson |
Modules, state and maintenance
Reuse, state, import and debugging.
| Question | Short answer |
|---|---|
Can a child module read var.env of the root? | No — pass it as an input — lesson |
| Pin a Git module to a version | ?ref=v1.2.0 in the source — lesson |
| Two people run apply at once | State locking blocks the second — lesson |
| Only update state with real values | terraform apply -refresh-only — lesson |
| Bring an existing VNet under Terraform | import block (+ -generate-config-out) — lesson |
| Rename a resource without destroying it | moved block (or state mv) — lesson |
| See provider API errors in detail | TF_LOG=DEBUG — lesson |
| Block plans with public IPs in a team | Policy as code in HCP Terraform — lesson |
Plan the exam day
Online proctored exam, about 57 questions in 60 minutes.
- Read every word: "which is NOT", "choose two".
- Many questions are about what a command does and where a setting lives.
- Hands-on practice beats reading: if you built the Azure project, most answers come from memory.
Next: Git and GitHub Actions for the pipeline around the code.