Testing an OpenTofu module without an AWS account: tofu test and mock_provider
In July I published a DNS Firewall module
and admitted that “tested” meant “applied it once and looked”. That is how most infrastructure modules are tested, and it
is why module refactors are scary. OpenTofu has had tofu test since 1.6 and provider mocking since 1.8, which
together let you assert what a module does - how many rules it creates, that the action is BLOCK, that the wildcard
gets added - without credentials, without a VPC, in a few seconds, in CI. Here is that module with real tests.