I am trying to test a pipeline change that will run tflint automatically, but I'm struggling to find an example of an error that won't prevent terraform init from completing without errors but will be caught by tflint --module. My goal is to prove that tflint is running is running in the pipeline and will fail any pipeline that finds linting errors. Any ideas?

I know there must be lots of examples, or tflint wouldn't exist - but I'm not running across them right now.

Examples of things I've tried so far: tflint doesn't catch white space or using dashes when underlines are more 'correct' (or is this a config issue on my part?), terraform init doesn't tolerate single quotes or misnamed modules.

1 Answer 1


These are the default rules for tflint. Most of these rules will have an example of how to trigger it and remediate it. A simple one you could use is the terraform_comment_syntax rule.

You can trigger it by using a // comment inside a *.tf file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.