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

rule: require module blocks to specify version #1176

Closed
andormarkus opened this issue Aug 3, 2021 · 4 comments · Fixed by #1182
Closed

rule: require module blocks to specify version #1176

andormarkus opened this issue Aug 3, 2021 · 4 comments · Fixed by #1182

Comments

@andormarkus
Copy link

Hi Community,

In the current version, tflint does not have rule check is module version pinned.
Alternatively, you can use terraform_module_pinned_source however, that does not work together with modules from Terraform registry.

Thanks for considering this feature.

Best,
Andor

@bendrucker bendrucker changed the title feature request: rules - terraform module/helm_release pinned version rule: pin module version Aug 3, 2021
@bendrucker bendrucker changed the title rule: pin module version rule: require module blocks to specify version Aug 3, 2021
@bendrucker
Copy link
Member

Yep, I've thought of this and I guess just forgot to introduce it. Pretty important as registries, public or private, become the dominant way of loading modules. Not sure I'm loading any modules loaded via git at this point.

I'm inclined to add this as a new terraform_module_version rule. I don't particularly like "pinned" since that's not used anywhere in Terraform's own documentation.

@andormarkus
Copy link
Author

What's your opinion on terraform_helm_release_version rule as well?
I know, we are in minority of the companies who fully configures their Kubernetes cluster with terraform.

@bendrucker
Copy link
Member

Oh yeah, wasn't sure whether that was related or just a mis-copy. That sounds totally reasonable, it just belongs in tflint-ruleset-helm (which doesn't exist) rather than the core Terraform rules. I'm also using the Helm provider pretty extensively and would happily use this rule.

Will tackle the module change relatively soon, will take a bit longer to get around to a Helm plugin.

@andormarkus
Copy link
Author

Sweet, thank you

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

Successfully merging a pull request may close this issue.

2 participants