Testing Terraform modules with terraform test: plan-mode unit tests, mocks and real applies
Our shared Terraform modules broke consumers twice in one quarter. We added terraform test: fast plan-mode tests with mocked providers on every pull request, and a nightly apply-mode suite against a sandbox account. The test layout, what to assert, and what it costs.