tools/terraform-bundle: match plugin installer protocol with terraform's installer
This commit is contained in:
parent
7816e61614
commit
073d367018
|
@ -14,7 +14,6 @@ import (
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
getter "github.com/hashicorp/go-getter"
|
getter "github.com/hashicorp/go-getter"
|
||||||
"github.com/hashicorp/terraform/plugin"
|
|
||||||
discovery "github.com/hashicorp/terraform/plugin/discovery"
|
discovery "github.com/hashicorp/terraform/plugin/discovery"
|
||||||
"github.com/mitchellh/cli"
|
"github.com/mitchellh/cli"
|
||||||
)
|
)
|
||||||
|
@ -150,12 +149,13 @@ func (c *PackageCommand) Run(args []string) int {
|
||||||
// FIXME: This is incorrect because it uses the protocol version of
|
// FIXME: This is incorrect because it uses the protocol version of
|
||||||
// this tool, rather than of the Terraform binary we just downloaded.
|
// this tool, rather than of the Terraform binary we just downloaded.
|
||||||
// But we can't get this information from a Terraform binary, so
|
// But we can't get this information from a Terraform binary, so
|
||||||
// we'll just ignore this for now as we only have one protocol version
|
// we'll just ignore this for now and use the same plugin installer
|
||||||
// in play anyway. If a new protocol version shows up later we will
|
// protocol version for terraform-bundle as the terraform shipped
|
||||||
// probably deal with this by just matching version ranges and
|
// with this release.
|
||||||
// hard-coding the knowledge of which Terraform version uses which
|
//
|
||||||
// protocol version.
|
// NOTE: To target older versions of terraform, use the terraform-bundle
|
||||||
PluginProtocolVersion: plugin.Handshake.ProtocolVersion,
|
// from the same tag.
|
||||||
|
PluginProtocolVersion: discovery.PluginInstallProtocolVersion,
|
||||||
|
|
||||||
OS: osName,
|
OS: osName,
|
||||||
Arch: archName,
|
Arch: archName,
|
||||||
|
|
Loading…
Reference in New Issue