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: terraform_unused_required_providers #1007

Merged
merged 6 commits into from
Dec 30, 2020

Conversation

bendrucker
Copy link
Member

As a complement to the "required providers" rule, this adds a rule that detects unused required providers. This ends up being slightly more complicated in the wild, since technically it's valid to put all your provider requirements in the root module, but it means terraform init may not work in child modules.

In theory this rule could also walk down the module tree looking for provider use, but I haven't implemented that here. This rule is disabled by default and users who specify required providers directly in each module can just turn it on.

Copy link
Member

@wata727 wata727 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@bendrucker bendrucker merged commit 0e7d5e8 into master Dec 30, 2020
@bendrucker bendrucker deleted the terraform-unused-required-providers branch December 30, 2020 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants