diff options
author | Alex Pilon <apilon@hashicorp.com> | 2019-02-22 18:24:37 -0500 |
---|---|---|
committer | Alex Pilon <apilon@hashicorp.com> | 2019-02-22 18:24:37 -0500 |
commit | 15c0b25d011f37e7c20aeca9eaf461f78285b8d9 (patch) | |
tree | 255c250a5c9d4801c74092d33b7337d8c14438ff /vendor/github.com/hashicorp/terraform/plugin/client.go | |
parent | 07971ca38143c5faf951d152fba370ddcbe26ad5 (diff) | |
download | terraform-provider-statuscake-15c0b25d011f37e7c20aeca9eaf461f78285b8d9.tar.gz terraform-provider-statuscake-15c0b25d011f37e7c20aeca9eaf461f78285b8d9.tar.zst terraform-provider-statuscake-15c0b25d011f37e7c20aeca9eaf461f78285b8d9.zip |
deps: github.com/hashicorp/terraform@sdk-v0.11-with-go-modules
Updated via: go get github.com/hashicorp/terraform@sdk-v0.11-with-go-modules and go mod tidy
Diffstat (limited to 'vendor/github.com/hashicorp/terraform/plugin/client.go')
-rw-r--r-- | vendor/github.com/hashicorp/terraform/plugin/client.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/vendor/github.com/hashicorp/terraform/plugin/client.go b/vendor/github.com/hashicorp/terraform/plugin/client.go index 3a5cb7a..7e2f4fe 100644 --- a/vendor/github.com/hashicorp/terraform/plugin/client.go +++ b/vendor/github.com/hashicorp/terraform/plugin/client.go | |||
@@ -1,8 +1,10 @@ | |||
1 | package plugin | 1 | package plugin |
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | "os" | ||
4 | "os/exec" | 5 | "os/exec" |
5 | 6 | ||
7 | hclog "github.com/hashicorp/go-hclog" | ||
6 | plugin "github.com/hashicorp/go-plugin" | 8 | plugin "github.com/hashicorp/go-plugin" |
7 | "github.com/hashicorp/terraform/plugin/discovery" | 9 | "github.com/hashicorp/terraform/plugin/discovery" |
8 | ) | 10 | ) |
@@ -10,11 +12,18 @@ import ( | |||
10 | // ClientConfig returns a configuration object that can be used to instantiate | 12 | // ClientConfig returns a configuration object that can be used to instantiate |
11 | // a client for the plugin described by the given metadata. | 13 | // a client for the plugin described by the given metadata. |
12 | func ClientConfig(m discovery.PluginMeta) *plugin.ClientConfig { | 14 | func ClientConfig(m discovery.PluginMeta) *plugin.ClientConfig { |
15 | logger := hclog.New(&hclog.LoggerOptions{ | ||
16 | Name: "plugin", | ||
17 | Level: hclog.Trace, | ||
18 | Output: os.Stderr, | ||
19 | }) | ||
20 | |||
13 | return &plugin.ClientConfig{ | 21 | return &plugin.ClientConfig{ |
14 | Cmd: exec.Command(m.Path), | 22 | Cmd: exec.Command(m.Path), |
15 | HandshakeConfig: Handshake, | 23 | HandshakeConfig: Handshake, |
16 | Managed: true, | 24 | Managed: true, |
17 | Plugins: PluginMap, | 25 | Plugins: PluginMap, |
26 | Logger: logger, | ||
18 | } | 27 | } |
19 | } | 28 | } |
20 | 29 | ||