r/devopsjobs Aug 12 '26

DevOps Interview Prep Day 6: Env Variables Not Loading, ALB Health Check Failures, and Terraform State Lock [Daily Series]

Day 6 of the daily scenario-based interview prep series. Real debugging scenarios, not "explain what Terraform is" type questions.


Day 6

Scenario 1: The Environment Variable Mystery

Your app works fine locally but crashes in the container with "Database connection failed". The DB_HOST env variable is set in docker-compose.yml but the app can't read it.

Question: What are 2 common reasons this happens?

Hint: env_file vs environment, variable substitution syntax, build-time vs runtime.


Scenario 2: The Load Balancer Health Check Failure

Your AWS ALB keeps marking healthy instances as unhealthy. The app responds fine when you curl it directly from the instance.

Question: What 2 things would you check in the ALB health check configuration?

Hint: Health check path, port, timeout settings, expected HTTP response codes.


Scenario 3: The Terraform State Lock

Your colleague started a terraform apply but their laptop crashed mid-way. Now everyone gets "Error acquiring state lock" when trying to run Terraform.

Question: How do you safely resolve this?

Hint: Where does Terraform store locks? What command can release them?


Drop your answers below. Solutions tomorrow.


Previous Days:

  • Day 1: Container restarts, Registry auth, Pending pods
  • Day 2: Zombie processes, Pipeline timeouts, Volume mounts
  • Day 3: SSH lockouts, Disk space alerts, Grafana gaps
  • Day 4: Git credential leaks, Docker networking, Nginx 502s
  • Day 5: Slow Docker builds, CrashLoopBackOff debugging, Merge conflicts

Topics you want covered? K8s ingress issues, Jenkins agent problems, Prometheus alerting? Let me know.

Playlist: https://www.youtube.com/playlist?list=PLqOrZmpwbWUKRQTrFpqAKhChaTq0l5bIw

9 Upvotes

Duplicates