Testing Infrastructure Code: terraform test, Mock Providers and a Policy Gate in CI

A Terraform module for a clinical-document bucket tested three ways in CI with no cloud account: fourteen unit tests on a mocked provider that pass on Terraform 1.16 and OpenTofu 1.12, ten deliberate defects that the tests must catch, and a policy gate over the JSON plan.

Read more →