Running Test and Compliance Security on Terraform Configuration
When writing Terraform configuration, it is very important to integrate a test phase into the Terraform workflow.
Indeed, when provisioning an infrastructure using a Terraform configuration, one must be careful not to bypass security rules, not to introduce vulnerabilities (even unintentionally), and to respect the company’s conventions.
For these reasons, it is necessary to introduce one or more test phases that will be applied to our Terraform configuration.
Exactly as for an application, there are several types of tests (for more information, see the explanation of the test pyramid here: https://martinfowler.com/articles/practical-test-pyramid.html) for a Terraform configuration.
For a Terraform configuration, here are the different types of tests:
- The unit test: This aims to test the Terraform configuration at the lowest level, by checking bits of resources without dependency on external...