Applying Terraform compliance using terraform-compliance
terraform-compliance allows you to write tests in a very readable format that follows the idea of Behavior-Driven Development (BDD).
With terraform-compliance, the tests are executed just after the terraform plan command, and before terraform apply, so that if the terraform-compliance tests are failing, apply will continue.
Let’s get started!
Getting ready
To complete this recipe, you’ll need to install the terraform-compliance binary, and for this installation, refer to the installation documentation here: https://terraform-compliance.com/pages/installation/.
The requirements for installing terraform-compliance are to have already installed python and pip (see the documentation here: https://pip.pypa.io/en/stable/installation/) on your machine.
The goal of this recipe is to write and execute compliance tests for the Terraform configuration that provisions an Azure Storage Account...