Kirill Solovei tackles a familiar infrastructure failure: Terraform approves a plan, then the cloud API rejects the apply. His walkthrough adds a disposable AWS Emulator instance between planning and the production deployment. The strongest example deliberately breaks a resource to show what that extra stage catches.
- Exercise the API path. His invalid DynamoDB table name,
ab, passes planning but fails during apply because the service requires at least three characters. - Keep the rehearsal isolated. Override service endpoints, use emulator credentials and separate Terraform state, and disable real-cloud credential and metadata lookups.
- Make startup a checked dependency. The automated build waits for a health endpoint, then runs initialization, validation, planning and apply. Solovei reports 1 minute 25 seconds for his example workflow.
- Test the test. A known-bad resource demonstrates that the rehearsal can fail for the reason the team expects.
The emulator adds a useful check on API behavior, with a clear ceiling. Solovei encountered unimplemented operations, and it cannot effectively validate IAM, AWS’s identity and permission rules. A fresh instance also lacks production’s existing resources and history.
Keep the production checks, but move failures that can be reproduced into a cheap rehearsal. A green plan and a successful API execution answer different questions.