diff options
Diffstat (limited to 'vendor/github.com/hashicorp/terraform/plugin/discovery/get.go')
-rw-r--r-- | vendor/github.com/hashicorp/terraform/plugin/discovery/get.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/vendor/github.com/hashicorp/terraform/plugin/discovery/get.go b/vendor/github.com/hashicorp/terraform/plugin/discovery/get.go index 241b5cb3..64d2b695 100644 --- a/vendor/github.com/hashicorp/terraform/plugin/discovery/get.go +++ b/vendor/github.com/hashicorp/terraform/plugin/discovery/get.go @@ -16,6 +16,7 @@ import ( cleanhttp "github.com/hashicorp/go-cleanhttp" getter "github.com/hashicorp/go-getter" multierror "github.com/hashicorp/go-multierror" + "github.com/mitchellh/cli" ) // Releases are located by parsing the html listing from releases.hashicorp.com. @@ -58,6 +59,8 @@ type ProviderInstaller struct { // Skip checksum and signature verification SkipVerify bool + + Ui cli.Ui // Ui for output } // Get is part of an implementation of type Installer, and attempts to download @@ -116,6 +119,7 @@ func (i *ProviderInstaller) Get(provider string, req Constraints) (PluginMeta, e log.Printf("[DEBUG] fetching provider info for %s version %s", provider, v) if checkPlugin(url, i.PluginProtocolVersion) { + i.Ui.Info(fmt.Sprintf("- Downloading plugin for provider %q (%s)...", provider, v.String())) log.Printf("[DEBUG] getting provider %q version %q at %s", provider, v, url) err := getter.Get(i.Dir, url) if err != nil { @@ -422,3 +426,7 @@ func getFile(url string) ([]byte, error) { } return data, nil } + +func GetReleaseHost() string { + return releaseHost +} |