Interview Prep/Terraform/Testing and Policy as Code

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"
}
All Terraform questions Roadmap: Terraform in production

More on Testing and Policy as Code