Rebase of #44, to keep the required providers logic in sync with Terraform. See also: hashicorp/terraform#25034
If multiple terraform.required_providers blocks are in the config, we already merge the version constraints for each provider. We should also merge the source attribute, and warn if there are duplicates.
Before this commit, this would result in a provider requirement for "foo" with version"1.0.0", but no source. This commit merges the source attribute from the second block into this requirement.
Rebase of #44, to keep the required providers logic in sync with Terraform. See also: hashicorp/terraform#25034
If multiple
terraform.required_providers
blocks are in the config, we already merge the version constraints for each provider. We should also merge the source attribute, and warn if there are duplicates.Consider the following configuration:
Before this commit, this would result in a provider requirement for
"foo"
withversion
"1.0.0"
, but nosource
. This commit merges the source attribute from the second block into this requirement.