Explore + Share Site

Testing Terraform with AWS Emulator

“Let's start with a local setup and see how we can utilize AWS Emulator with the actual Terraform code. All code is available in my example GitHub repository.”

Jump to Highlight ↗
📖 Curated Deep Read Preview 264 words · ~2 min read

Terraform plan passes and shows all green and all the necessary resource changes. You trigger apply and... the job fails with some obscure error that a resource can't be changed. You open another pull request and try again. And perhaps you encounter an error again. Sounds familiar? I bet it does. I encountered issues like this so many times I'm afraid to count. But recently AWS released a new tool called Emulator that emulates actual AWS API endpoints. And it should be great for tasks just like that!

The problem with the difference between plan and apply jobs is that plan can't possibly emulate every actual API call against a live infrastructure. It's a safe assumption based on the static declarations we put into it – the order of application, the necessary parameters, the proper configuration values. These mock calls can't know for a fact that you already have a resource in AWS called "my-bucket-asdasdasd" or that you're trying to upgrade a PostgreSQL RDS instance from version 14 to version 18 without an explicit "apply immediately" flag. One may argue that one can always try to apply changes locally, but this kinda undermines the whole automation workflow. So what is the answer?

There are multiple tools that can emulate AWS services either partially or in full, but what they lack is the actual knowledge of the service architecture. It may be similar, but it won't be authentic, and sometimes this small difference may cause a lot of problems. After all, what can be the closest to an AWS API, if not the same AWS API, but ephemeral?

Continue reading the full piece on notes.hatedabamboo.me ↗
Quick Use-Case Tags (tap to vote)
Visit Website ↗

📝 Your Private Notes & Highlights 🔒 Only visible to you

Log in or create a free account to keep private highlights and personal notes on your stored picks.

Creator Trophy & Press Kit

Featured on Storesso

Are you the creator of notes.hatedabamboo.me? Share your verified feature badge on your website, or export a custom 4:5 editorial social card for Instagram and X.

Verified Website Badge
Featured on Storesso
Claim Resource →
4:5 Social Studio

Generate a 1080×1350 vertical high-res feature card tailored for social sharing.

Instagram & X Feature Card

Export a polished, high-resolution 4:5 editorial graphic displaying your verified inclusion in the Storesso Discovery Index. Perfect for launch threads, founder updates, and newsletters.

Rendered at 1080×1350px (Retina ready) · No attribution watermark required.

Curated in These Public Collections

Discussion 0
🛡️ Safe comments: Text, Emojis & Reaction GIFs only (links & media URLs blocked)
✨ Author / Creator Quick-Reply No password required · Or Sign In