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

Create a tflint ruleset #19

Closed
nitrocode opened this issue Nov 5, 2023 · 2 comments
Closed

Create a tflint ruleset #19

nitrocode opened this issue Nov 5, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@nitrocode
Copy link

nitrocode commented Nov 5, 2023

It would be nice to integrate this into tflint via a custom ruleset or directly in the terraform ruleset

References

@suzuki-shunsuke
Copy link
Owner

Thank you for your proposal.
I'm not familiar with tflint custom ruleset, but I'll take a look.

@suzuki-shunsuke suzuki-shunsuke added the enhancement New feature or request label Nov 5, 2023
@nitrocode nitrocode changed the title request to create a tflint ruleset Create a tflint ruleset Nov 5, 2023
@nitrocode
Copy link
Author

nitrocode commented Nov 6, 2023

No need. See this converted discussion. Thanks for considering.

terraform-linters/tflint-ruleset-terraform#148 (comment)

I'd say this is a policy enforcement issue versus adherence to official Terraform recommendations.

I also wouldn't recommend static analysis (TFLint) as a means of doing this—tfprovidercheck is taking the right approach. The actual list of used providers is determined by the whole module tree, both root and children. By using the JSON mode of terraform version, it's getting the exact versions fetched by terraform init, which in turn handles resolving provider versions from the requirements in the module tree.

If you use static analysis, a deny rule can be trivially bypassed with a module block with any remote source (registry, git, etc.).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants