Skip to main content
Your progress
0 of 4 lessons complete0%
T5 / M5.6 / Engineer TIER / ~10 min

IaC + cost: module quiz

M5.6 module quiz

Ten questions. 80% to pass (8 of 10). Open book, unlimited retakes.

Answers are collapsed under each question. Answer first, then check.


Q1

In Terraform, self.tags inside a precondition:

A. Errors; self is valid only in postconditions
B. Works as written on any version
C. Works from Terraform 1.5 onward
D. Requires an explicit provider alias first

Show answer

Correct: A. The three-layer pattern is default tags for the floor, variable validation for typos, and postconditions for apply-time enforcement.

Q2

The three IaC tag-enforcement layers are:

A. Plan, apply and destroy
B. Module, workspace, provider
C. Default tags, variable validation, postconditions
D. Preventive, detective and reactive controls

Show answer

Correct: C. They compound: defaults set the floor, validation catches typos before apply, postconditions catch what is still missing at apply time.

Q3

IaC enforcement alone reaches roughly 85% coverage because:

A. Terraform has a hard tag count limit
B. It only covers IaC-provisioned resources
C. Tags are optional in most providers
D. Providers strip tags on some types

Show answer

Correct: B. Console-created and pre-IaC resources are the gap, which is what cloud-native policy and Smart Tags close from the other side.

Q4

IaC drift is classified as:

A. Major and minor drift
B. Config and state
C. Config and state drift
D. Additive and destructive

Show answer

Correct: C. Each needs a different response: intentional drift should be codified, accidental reverted, unauthorized investigated. Treating all three the same is why drift backlogs grow.

Q5

Pre-merge cost estimation adds most value when:

A. The estimate is surfaced in the PR where the author can still change their mind
B. Applied to every single pull request in the repository, without exception
C. Run nightly against the merged main branch
D. Reported to finance for the monthly review

Show answer

Correct: A. A cost finding delivered three days later in a different tool competes with everything else in the queue. In the pull request it competes with nothing.

Q6

Pre-merge estimation cannot price:

A. Instances that the plan declares, priced from the published rate card
B. Consumption-driven costs such as data transfer and request volume
C. Managed databases in the plan
D. Storage volumes it provisions

Show answer

Correct: B. Nothing in a plan says how many requests a function will receive, so a change adding a NAT gateway and a busy Lambda prices the gateway and misses the egress.

Q7

terraform import is risky primarily because:

A. It is slow to run against a large Terraform state file
B. It requires elevated permissions
C. It cannot be undone once run
D. State and reality can diverge in ways the plan then acts on

Show answer

Correct: D. An import that binds the wrong resource makes the next apply destructive against something nobody intended to manage.

Q8

Before a destroy, the mandatory step is:

A. Taking a snapshot of the Terraform state file before you start
B. Working the pre-destruction checklist, including blast-radius mapping
C. Notifying the provider in advance
D. Disabling monitoring for the window

Show answer

Correct: B. Destroy is the operation where the gap between what the author thinks is in scope and what is actually in scope produces the worst outcomes.

Q9

Destruction order matters because:

A. Providers require that resources be removed in one specific documented order first
B. It changes the resulting cost
C. Dependent resources must be removed before their dependencies, or the destroy stalls part-way
D. It affects the state file size

Show answer

Correct: C. A half-completed destroy leaves an estate in a state neither the code nor the console describes, which is the hardest kind to recover.

Q10

Drift detection should run:

A. Only before a release goes out
B. Manually, whenever someone remembers to run it
C. After every apply completes
D. On a schedule, so drift is found before it compounds

Show answer

Correct: D. Drift found at 14 days is a conversation; drift found at 6 months is an archaeology project, and the difference is entirely the detection cadence.


What’s next

Back to IaC + cost.

Start with the bill.

Foundations takes about five hours. The first lesson is nine minutes.

Open curriculum. No login. No paywall. 290 lessons across 7 courses, three publicly verifiable credentials. Read it on the train, take the exam on a Saturday, list the credential on your résumé Monday.

5h median time to finish Foundations
0 logins, paywalls, or marketing forms
open curriculum, public credential verifier
Multi-cloud automation· Production-ready in 30 min· SOC 2 · ISO 27001· 20–60% off the bill, first month· 4 platforms · 1 console· Multi-cloud automation· Production-ready in 30 min· SOC 2 · ISO 27001· 20–60% off the bill, first month· 4 platforms · 1 console·