DevOpsInterviews logo

Infrastructure as Code & Configuration

40 questions
0 of 40 done · 18 unlocked for you
DONEUNLOCKEDLOCKED

Terraform & Infrastructure as Code Interview Questions

Terraform and OpenTofu state, remote backends and locking, drift detection, count versus for_each, module design, lifecycle blocks, Ansible idempotence, and the BUSL license split every interviewer now probes.

Grounded in researched DevOps, SRE and platform engineering interview loops, written to a senior-engineer editorial bar, and never padded to hit a word count.

Start with a free answer

These openings come from the existing worked answers. Each link opens the full explanation and follow-up, with no account required.

count versus for_each in Terraform: when does list ordering cause a destroy and recreate?

TL;DR: count addresses resources by positional index, so removing an item from the middle of the list shifts every later item's address and Terraform reassociates later addresses with different configuration. Whether each update is in place or a replacement depends on the attributes and provider. for_each addresses by a stable string key, so removing one item touches only that one.

Read the full free answer →

A SUGGESTED ORDER

Learn it, diagnose it, defend the decision.

Explain what Terraform records in state, then reason through two applies competing for the same infrastructure. Attempt each scenario before opening its answer.

  1. 01Trace plan and apply
  2. 02Explain what belongs in state
  3. 03Handle concurrent applies

Each page shows its access requirement. Some answers and course exercises require Premium.

You have 18 free answers unlocked here.Sign in free for 10 more · 12 are premium.
01–16Foundationsthe words and mechanisms every loop takes as given0/16 done
17–30Core loopsthe questions every loop actually asks0/14 done
31–40Field scenariosthe half-specified problems a real estate throws at you0/10 done

The concepts behind Infrastructure as Code & Configuration

The ideas from the curriculum that these questions take as given. The foundations are open to everyone; the ones that decide a senior round sit behind Premium.

Unlock all 40 answers · ₹2,000 / $25