-
Notifications
You must be signed in to change notification settings - Fork 367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support custom messages when failing tflint checks #768
Comments
Since messages are assembled in code, just allowing a static replacement seems a bit confusing. Can you provide a real world example of how you'd use this? |
rule "aws_resource_missing_tags" {
enabled = true
tags = ["Foo", "Bar"]
exclude = ["aws_autoscaling_group"] # (Optional) Exclude some resource types from tag checks
msg = "bro bro bro you're missing some really important tags. see this confluence page for our mandatory tags page and why each tag is useful. also see this link for our custom terraform module that implements this to make life easier."
} |
Hmm, how about a custom URL that replaces the self-link to the TFLint docs? That way if you have custom rule configuration you can link to a custom document that describes how to fix the issue. |
¯_(ツ)_/¯ That would be more helpful and customizable than the current implementation. I'd still want to append the output at the very least. Like the example above, I'd want to share multiple links. |
Sounds good, an optional message that is printed after |
Will share my thoughts at the moment. I believe that in many cases this is the case where you want to apply the policy. So instead of supporting custom messages, I think it should be better to make defining policies easy. This is tracked by #1358. However, for some rules, it may be useful to be able to set custom messages. In that case, you can address it by changing the rule implementation. There are currently no plans to provide this as a feature of TFLint CLI. Closing this issue based on the above. If you want to discuss more, please open a new discussion instead of an issue. Thanks. |
Would be nice to be able to define custom messages in every rule to either overwrite or append tflint's default message
The text was updated successfully, but these errors were encountered: