Skip to content
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

Question - Is it possible to ignore rules by resource/file? #142

Closed
shauns opened this issue Sep 20, 2017 · 2 comments · Fixed by #277
Closed

Question - Is it possible to ignore rules by resource/file? #142

shauns opened this issue Sep 20, 2017 · 2 comments · Fixed by #277
Milestone

Comments

@shauns
Copy link

shauns commented Sep 20, 2017

The config settings for ignoring rules seem to be per-project. Is it possible to ignore rules per-file or per-resource?

I have a set of existing resources that break some of the recommendations -- I'd like to catch if I add something that breaks these, but thats hard to spot with the baseline noise that comes from the existing resources.

@wata727
Copy link
Member

wata727 commented Sep 20, 2017

Unfortunately, it cannot ignore only specific files or resources...
I have not thought of a good way yet, but I think that it must be able to set more detailed settings.

@wata727 wata727 added this to the v0.9.0 milestone May 25, 2019
@wata727
Copy link
Member

wata727 commented May 29, 2019

Hi @shauns, I'm sorry for the late reply.

In v0.8.1, ignore annotations are available for suppressing issues on the specific lines. The following is an example:

resource "aws_instance" "foo" {
    # tflint-ignore: aws_instance_invalid_type
    instance_type = "t1.2xlarge"
}

Please see the README for details. Thank you for your question!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants