What does tflint do, and how is it configured?
BeginnerProductionTesting and Policy as Code
Answer
tflint lints Terraform code for errors validate misses, such as t2.nanoo as an instance type, deprecated interpolation or unused variables. Enable provider rulesets in .tflint.hcl and run tflint --init once.
plugin "aws" {
enabled = true
version = "0.38.0"
source = "github.com/terraform-linters/tflint-ruleset-aws"
}
More on Testing and Policy as Code
How do you test infrastructure code, and what does the testing pyramid look like?BeginnerWhat does the static-analysis layer catch?BeginnerHow do Checkov and Trivy differ?IntermediateHow does `terraform test` work?BeginnerHow do mock providers work in `terraform test`?AdvancedWhen do you use Terratest instead of `terraform test`?Intermediate