Interview Prep/Terraform/Testing and Policy as Code

How do you test against multiple provider versions?

IntermediateProductionTesting and Policy as Code
Answer

Run the module's test suite in a CI matrix with the minimum supported provider version (the lower bound in required_providers) and the latest, using terraform init -upgrade for latest and a lock file for the minimum. It catches the case where you used an argument introduced after your stated lower bound.

All Terraform questions Roadmap: Terraform in production

More on Testing and Policy as Code