Getting Terraform to apply only when a change exists using Make
· ☕ 11 min read · ✍️ Sathyajith Bhat
TL;DR Applying some Bash knowhow on exit codes, you can cut down the time required for a Terraform apply if no changes are to be done. The Simple Plan and Apply Over the past couple of weeks, I’d been working on getting our alerts deployed with Terraform. The initial proof of concept was a very simple shell script with a lot of copy-paste to handle the many accounts, environments and regions that I work on.