Merge pull request #23658 from hashicorp/mildwonkey/b-terrafrom-bundle

terraform-bundle: fix panic with addrs.Provider
This commit is contained in:
Kristin Laemmert 2019-12-13 08:00:19 -05:00 committed by GitHub
commit 2f36a82091
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -39,10 +39,12 @@ testacc: fmtcheck generate
TF_ACC=1 go test $(TEST) -v $(TESTARGS) -mod=vendor -timeout 120m
# e2etest runs the end-to-end tests against a generated Terraform binary
# and a generated terraform-bundle binary.
# The TF_ACC here allows network access, but does not require any special
# credentials since the e2etests use local-only providers such as "null".
# credentials.
e2etest: generate
TF_ACC=1 go test -mod=vendor -v ./command/e2etest
TF_ACC=1 go test -mod=vendor -v ./tools/terraform-bundle/e2etest
test-compile: fmtcheck generate
@if [ "$(TEST)" = "./..." ]; then \

View File

@ -182,7 +182,7 @@ func (c *PackageCommand) Run(args []string) int {
} else { //attempt to get from the public registry if not found locally
c.ui.Output(fmt.Sprintf("- Checking for provider plugin on %s...",
releaseHost))
_, _, err := installer.Get(addrs.Provider{Type: name}, constraint)
_, _, err := installer.Get(addrs.NewLegacyProvider(name), constraint)
if err != nil {
c.ui.Error(fmt.Sprintf("- Failed to resolve %s provider %s: %s", name, constraint, err))
return 1