Skip to content
Tech Interview Prep
Technical interview guide

Self-Service Infrastructure

Letting teams provision what they need through an API or portal, with policy enforced automatically instead of manually.

Minutes to read
3
Practice MCQs
25
Interview Q&A
25
Edition
v4
Editorial status
Reviewed
Relevant for
Platform Engineer

Scope: AWS and Microsoft platform engineering guidance and HashiCorp Terraform/HCP Terraform documentation current 2026-08-31; confirm product-tier and version-specific policy features for the target deployment.

Overview

Curated: · Written: · Reviewed:

Self-Service Infrastructure

In one line

Self-service infrastructure lets an authorized team provision, change, inspect and retire supported resources through an API, CLI, portal or declaration, with authorization and policy enforced by the platform instead of a ticket queue. Reach for it when the journey is common, supported and bounded enough to templatize.

Key definitions

  • Golden path: a small set of fully supported templates for the common case.
  • Escape hatch: a time-bound, justified, audited route for anything off the path.
  • Plan-time policy: rules evaluated against the rendered plan JSON before apply.
  • Confused deputy: a caller names a resource it may not touch, and the orchestrator's broader privilege reaches it.
  • Reconciler: a scheduled job that compares declared state with provider reality and corrects platform-owned fields.

How it works

  1. The requester sends only the intent the platform cannot infer. The server authorizes against team, environment and resource class before anything else runs.
  2. Schema validation runs at request time. The template renders at a pinned version.
  3. A planner role produces a plan. Plan-time policy reads the plan JSON. Approval gates apply where policy requires them.
  4. A separate applier role with its own short-lived session applies that exact plan. The record stores the provider run id and session id.
  5. The reconciler checks drift, TTL and ownership on a schedule.
deny pass Request with minimal intent Authorize and validate at request time Plan with planner role Plan-time policy Return rule, affected object, fix Approval if policy requires it Apply with applier role Reconciler: drift, TTL, ownership

When to use and when not to

ConditionSelf-serviceHuman review or stronger path
Journey is common and repeatedYesOne-off design work
Blast radius is bounded (dev database, ephemeral environment)YesProduction deletion and data moves need stronger authorization
Rule has a plan-time or admission check with a fix messageYesJudgment calls with no remediation path
Cost and destructive effects are visible to the requesterYesHidden cost or durability effects
Arbitrary resource creation in any cloud accountNeverPrivilege concentrates in one identity

Traps interviewers probe

  1. Matching one action value. A rule that flags actions == ["delete"] misses replacements. Terraform records a replace as ["delete","create"], or ["create","delete"] when create_before_destroy is set. Fix: flag any change whose actions include delete.
  2. Defaulting a sensitive field. A default data classification put cardholder data under weak controls for 90 days. Fix: make the field required and reject requests that omit it.
  3. Treating local state as durable. A state file on one laptop is lost with the disk, and the resources it tracked keep running unmanaged. Fix: use a remote backend with versioning and locking, then recover from a backup or re-adopt resources with terraform import.
  4. Giving plan runs apply power. Plans execute configuration code, including code from pull requests. Fix: plans get read-only, short-lived credentials, and the applier is a different role that runs only from protected branches.
  5. Retrying a non-idempotent call. A client that retries POST /transfers after a timeout can move money twice. Fix: require an Idempotency-Key and return the original result for a repeated key. A 202 response means accepted for async processing, not settled.

Interview tips

Opening: self-service removes the ticket and the human approver for the common case. It does not remove governance. Governance moves into product design, authorization, policy, evidence and lifecycle operations.

Terraform specifics to quote:

  • Changing ami on aws_instance forces replacement, so the plan shows -/+. Adding aws_eip is a plain create.
  • Several instances from one block: with count, removing an element shifts the indices and can replace the wrong instances. for_each keys each instance by a stable name.
  • Two engineers on an S3 backend: state locking serializes applies. The older mechanism is a DynamoDB table set with dynamodb_table. Terraform 1.10 and later can lock with a lock file in S3 via use_lockfile = true. Say which version you assume.
  • A killed CI apply can leave the lock held. Confirm no run is still active, check the state for a half-applied resource, then run terraform force-unlock <LOCK_ID>.

Admission and break-glass: an override is time-bound, names the approver, emits an audit event and expires on its own. Policy failures return the rule, the affected object and the fix.

Follow-ups to expect: drift, cancellation during apply, a stuck state lock, a policy service outage, break-glass access, safe deletion, state recovery, and how you measure success.

30-second outline:

  1. Define the boundary: a supported journey, an eligible cohort, and what the platform will not do.
  2. Minimal intent in. Authorization and validation run server-side.
  3. Three gates: request time, plan time, admission time. Each returns the rule, the affected object and the fix.
  4. Separate credentials per actor, each short-lived.
  5. Lifecycle: status records, TTL, ownership, reconciliation, and deletion that checks dependencies first.
  6. Measure completion time, idle cost and abandonment, not resources created.

Feedback on this overview

Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.