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

Support matchers in a monorepo setup #137

Closed
moritzzimmer opened this issue Dec 19, 2022 · 3 comments
Closed

Support matchers in a monorepo setup #137

moritzzimmer opened this issue Dec 19, 2022 · 3 comments

Comments

@moritzzimmer
Copy link

We are using tflint for linting a repository with multiple independent (in terms of state) stacks. Our GitHub action loops over all of those stacks (using --force) to gather all findings.

It seems like anntotations are not using the full path of the affected terraform file, so those are not visible in the GitHub UI:

Notice: main.tf:23:26: Notice - "default.mysql5.6" is default parameter group. You cannot edit it. (aws_db_instance_default_parameter_group)
Error: main.tf:16:26: Error - "mysql57" is invalid engine. (aws_db_instance_invalid_engine)

The main.tf file is actually global/cdn/content/main.tf in this example. Would it be possible to configure the problem matcher to support a monorepo structure?

Might be related to #19

@wata727
Copy link
Member

wata727 commented Dec 19, 2022

We plan to add --chdir and --recursive flags in TFLint v0.44.
terraform-linters/tflint#1612
terraform-linters/tflint#1622

When using these, the output path will be a relative path from the original working directory.

@moritzzimmer
Copy link
Author

moritzzimmer commented Dec 20, 2022

Thanks for the quick reply @wata727 , looking forward to v0.44

@wata727
Copy link
Member

wata727 commented Dec 28, 2022

v0.44 has been released.
https://github.com/terraform-linters/tflint/releases/tag/v0.44.0

@wata727 wata727 closed this as completed Dec 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants