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

terraform_required_providers: emit error when only source is specified #998

Merged
merged 1 commit into from Dec 9, 2020

Conversation

bendrucker
Copy link
Member

In Terraform 0.13+, all providers not in the hashicorp namespace that are loaded from the Terraform Registry require a source. This means a user might likely to have the following working config:

terraform {
  required_providers {
    datadog = {
      source = "datadog/datadog"
    }
  }
}

The intent of this rule is to require modules to specify their provider version requirements. Currently, the above is accepted since there's an entry in required_providers. Checking for a non-nil version constraint ensures that the version has been included in the provider source.

@bendrucker bendrucker changed the title terraform_required_providers: emit error when "version" is missing terraform_required_providers: emit error when only source is specified Dec 9, 2020
@bendrucker bendrucker merged commit 81679ed into master Dec 9, 2020
@wata727 wata727 deleted the required-providers-version branch May 2, 2023 08:36
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

1 participant