Back to the course
Test yourself

Infrastructure as Code & automation

Final exam · 46 questions · answers explained as you pick
Beginner · Foundations
5 questions
01Infrastructure as Code means…
Incorrect — that is the manual approach IaC replaces.
Correct — reproducible, reviewable, auditable like software.
Incorrect — the code IS the runbook, executable.
Incorrect — unrelated.
02The biggest problem with changing infrastructure by hand in the console is…
Correct — nobody can recreate it, and the code no longer matches reality.
Incorrect — speed is not the issue.
Incorrect — no.
Incorrect — irrelevant.
03Provisioning vs configuration management: provisioning is…
Incorrect — that is configuration management (Ansible).
Correct — Terraform's job; Ansible then configures it.
Incorrect — no.
Incorrect — no.
04A declarative IaC tool is idempotent, which means…
Incorrect — not about speed.
Incorrect — the opposite — no change if reality already matches.
Correct — safe to run continuously.
Incorrect — unrelated.
05Because a declarative tool converges reality to your code, removing a resource from the code…
Correct — always read the plan for destroys.
Incorrect — no — it is a deletion instruction.
Incorrect — no.
Incorrect — no.
5 questions · explanations appear as you answer
Beginner · Terraform basics
6 questions
01A Terraform provider is…
Incorrect — no — state is separate.
Correct — exposes resource types; makes Terraform cloud-agnostic.
Incorrect — no.
Incorrect — a module is reusable config, not a provider.
02resource "aws_instance" "web" { ... } declares…
Correct — TYPE "name" plus arguments.
Incorrect — no.
Incorrect — no.
Incorrect — no.
03Terraform state (terraform.tfstate) exists to…
Incorrect — code is in .tf files.
Incorrect — that is .terraform/.
Correct — Terraform's memory of what it created.
Incorrect — no.
04You should NEVER commit terraform.tfstate to Git because it…
Correct — gitignore it; use an encrypted remote backend.
Incorrect — size is not the issue.
Incorrect — it is plaintext — that is the problem.
Incorrect — the opposite.
05In a terraform plan, -/+ (replace) means…
Incorrect — that is ~.
Correct — the dangerous one; scan plans for it.
Incorrect — that is +.
Incorrect — no.
06Provider versions should be…
Correct — reproducible runs; a new major could break config.
Incorrect — that risks breaking changes on init.
Incorrect — no.
Incorrect — no.
6 questions · explanations appear as you answer
Beginner · Configuration management
5 questions
01Ansible is characterized as…
Incorrect — that is Puppet/Chef.
Correct — nothing to install on targets.
Incorrect — it configures existing machines.
Incorrect — no.
02An Ansible inventory…
Correct — a playbook targets a group.
Incorrect — that is Ansible Vault.
Incorrect — that is the playbook/modules.
Incorrect — no.
03Ansible modules (apt, service, copy) are idempotent, so a task reports "changed" only when…
Incorrect — that would break idempotence.
Incorrect — no.
Correct — ok = already in desired state; changed = it did something.
Incorrect — unrelated.
04You should prefer real modules over the command/shell task because…
Correct — guard it, or use a module that declares desired state.
Incorrect — speed is not the point.
Incorrect — it exists for rare cases.
Incorrect — they can; that is not the reason.
05Puppet and Chef differ from Ansible mainly by being…
Incorrect — no.
Correct — good at large-scale continuous enforcement.
Incorrect — they configure servers.
Incorrect — Puppet has its own DSL; Chef uses Ruby.
5 questions · explanations appear as you answer
Intermediate · Terraform at scale
5 questions
01A Terraform module is…
Correct — call it like a function with different inputs.
Incorrect — no.
Incorrect — no.
Incorrect — no.
02A remote backend (S3, Terraform Cloud) is needed once a team shares infrastructure because…
Incorrect — no.
Correct — local copies diverge and get clobbered.
Incorrect — no.
Incorrect — no.
03State locking prevents…
Incorrect — no.
Incorrect — unrelated.
Correct — via a DynamoDB table or Terraform Cloud; serialize applies.
Incorrect — that is a separate concern.
04For genuine isolation between dev and prod, prefer…
Correct — strong blast-radius boundaries.
Incorrect — they share a backend/config — not strong isolation.
Incorrect — huge blast radius.
Incorrect — not possible for real infra.
05Terragrunt’s purpose is to…
Incorrect — no — it wraps and orchestrates it.
Correct — a scale tool for many envs/components.
Incorrect — that is Checkov/tfsec.
Incorrect — no.
5 questions · explanations appear as you answer
Intermediate · Beyond Terraform
5 questions
01OpenTofu is…
Correct — near drop-in; foundation-governed.
Incorrect — no.
Incorrect — no.
Incorrect — it is a fork of it.
02Pulumi differs from Terraform by…
Incorrect — no.
Correct — power and complexity of a full language.
Incorrect — it still uses state + plan/apply.
Incorrect — it is multi-cloud.
03AWS CloudFormation’s main limitation vs Terraform is that it…
Incorrect — it manages state (stacks) for you.
Incorrect — it can.
Correct — Terraform spans clouds.
Incorrect — it is declarative.
04Crossplane provisions cloud infrastructure by…
Correct — appeals to platform teams on K8s.
Incorrect — that is more like CDKTF.
Incorrect — no.
Incorrect — no.
05Choosing among these tools should be driven by…
Incorrect — novelty is a bad basis.
Correct — CloudFormation for deep AWS, Crossplane for K8s platforms, etc.
Incorrect — no.
Incorrect — no reason to.
5 questions · explanations appear as you answer
Intermediate · Kubernetes IaC
5 questions
01Helm is…
Correct — install/upgrade/rollback an app as one unit.
Incorrect — no.
Incorrect — no.
Incorrect — no.
02A Helm chart renders different manifests per environment by…
Incorrect — no — one chart, different values.
Correct — {{ .Values.replicas }} filled from values-prod.yaml.
Incorrect — no.
Incorrect — no.
03Kustomize differs from Helm by being…
Incorrect — unrelated.
Incorrect — that is more Helm.
Correct — built into kubectl (apply -k).
Incorrect — no.
04helm rollback myapp 1 does what?
Correct — application-level rollback.
Incorrect — no.
Incorrect — no.
Incorrect — no — it is a revision, not a version.
05Installing a third-party Helm chart is risky because it…
Incorrect — no — it runs third-party code in your cluster.
Correct — pin the version, helm template to review, override defaults.
Incorrect — helm template renders it for review.
Incorrect — not inherently.
5 questions · explanations appear as you answer
Advanced · Policy & scanning
5 questions
01Policy-as-code (OPA/Conftest, Sentinel) is used to…
Correct — guardrails in code, before apply.
Incorrect — that is Terraform.
Incorrect — no.
Incorrect — no.
02Conftest evaluates policy against…
Incorrect — it checks config files.
Correct — deny rules fail the build.
Incorrect — that is a scanner like Trivy.
Incorrect — no.
03Checkov, tfsec/Trivy, Terrascan, and KICS are…
Incorrect — no.
Incorrect — no.
Correct — a baseline of security knowledge for free.
Incorrect — no.
04Policy/scanning is only a real control if it…
Correct — warnings get ignored; gates hold.
Incorrect — ignored.
Incorrect — shift left into CI.
Incorrect — that enforces nothing.
05A clean IaC scan means…
Incorrect — overstated.
Correct — scanners catch known patterns, not logic/design flaws.
Incorrect — human review still matters.
Incorrect — separate concern.
5 questions · explanations appear as you answer
Advanced · GitOps for infrastructure
5 questions
01GitOps for infrastructure means…
Correct — merge to change infra.
Incorrect — exactly the risky pattern GitOps replaces.
Incorrect — no.
Incorrect — the opposite.
02Atlantis works by…
Incorrect — no.
Correct — reviewed plans, audit trail, no local prod creds.
Incorrect — that is Argo/Flux.
Incorrect — no.
03Argo CD / Flux vs Atlantis: Argo/Flux…
Incorrect — that is Atlantis.
Incorrect — no.
Correct — often used alongside Atlantis.
Incorrect — no.
04GitOps relocates the security risk to…
Correct — branch protection, reviews, scoped runner creds, isolation.
Incorrect — the risk moves, not vanishes.
Incorrect — the opposite — it removes local prod creds.
Incorrect — GitOps reduces console use.
05Drift is…
Incorrect — no — it is a problem.
Correct — detect with scheduled plan; the durable fix is preventing out-of-band changes.
Incorrect — no.
Incorrect — no.
5 questions · explanations appear as you answer
Advanced · Testing & secrets
5 questions
01Terratest is used to…
Correct — strongest confidence; run for key modules/releases.
Incorrect — that is fmt/validate/tflint.
Incorrect — no.
Incorrect — no.
02A Terratest test must always…
Incorrect — never — use a sandbox account.
Correct — avoid orphaned resources and surprise bills.
Incorrect — that leaks resources.
Incorrect — scope to the sandbox.
03The strongest way to handle a secret in Terraform is to…
Incorrect — committed to Git — never.
Incorrect — same leak.
Correct — code references it; value is not stored in code.
Incorrect — no.
04The trap that catches careful teams is that Terraform…
Correct — "keep secrets out of code" is only half; guard state.
Incorrect — it does not.
Incorrect — it often does, in state.
Incorrect — no.
05IaC supply-chain security requires, above all…
Incorrect — newer is not safer.
Correct — IaC runs with the power to change everything.
Incorrect — that is the risk.
Incorrect — the opposite.
5 questions · explanations appear as you answer