Manage EKS with Terraform›Part 1 · Cheat sheet & self-check
Learning Hub / Cloud — OpenStack, AWS & EKS / Manage EKS with Terraform

Part 1 — Foundations · wrap-up

Cheat sheet & self-check

9 questions across 3 lessons. Each answer links back to the lesson it came from.

Pick an answer to see if you got it, and why.

  1. Q1. Why split an EKS stack into several layers with separate state?

    Show answer

    B. A change to a Helm chart shouldn't be able to replace the VPC. Layers keep each plan small and each state focused.

    From lesson 01 · Repo layout & run order
  2. Q2. Where should environment differences (sizes, CIDRs, versions) live?

    Show answer

    B. Same code, different inputs keeps environments consistent; promotions become input changes, reviewed like code.

    From lesson 01 · Repo layout & run order
  3. Q3. What does committing .terraform.lock.hcl give you?

    Show answer

    B. The dependency lock file pins provider versions and hashes, so a new provider release can't change a plan unexpectedly.

    From lesson 01 · Repo layout & run order
  4. Q4. Why keep Terraform state in S3 rather than on a laptop?

    Show answer

    B. Local state can't be shared safely and is easily lost. Remote state with locking is the basis of team workflows.

    From lesson 02 · Remote state: S3, locking, env-per-tfvars
  5. Q5. What does state locking prevent?

    Show answer

    B. The lock (an S3 lock file in newer Terraform, or a DynamoDB item in older setups) makes the second run wait or fail.

    From lesson 02 · Remote state: S3, locking, env-per-tfvars
  6. Q6. What does exit code 2 from 'terraform plan -detailed-exitcode' mean?

    Show answer

    B. Nightly jobs use it to detect drift: 0 means in sync, 2 means something changed outside (or inside) Terraform.

    From lesson 02 · Remote state: S3, locking, env-per-tfvars
  7. Q7. Why can a single Terraform stack that creates EKS and installs Helm charts fail on the first plan?

    Show answer

    B. Providers are configured before resources are applied. If their configuration depends on resources not yet created, planning can fail or behave unpredictably.

    From lesson 03 · The multi-provider chicken-and-egg
  8. Q8. Why prefer an exec block ('aws eks get-token') over a token from the aws_eks_cluster_auth data source?

    Show answer

    B. Long applies (node groups, Helm charts with waits) can outlive a pre-fetched token. Exec authentication avoids that.

    From lesson 03 · The multi-provider chicken-and-egg
  9. Q9. What's the most robust structure for cluster + platform components?

    Show answer

    B. Layering removes the dependency at plan time, reduces blast radius, and lets the layers change at different speeds.

    From lesson 03 · The multi-provider chicken-and-egg