6 plugin "github.com/hashicorp/go-plugin"
7 "github.com/hashicorp/terraform/plugin/discovery"
10 // ClientConfig returns a configuration object that can be used to instantiate
11 // a client for the plugin described by the given metadata.
12 func ClientConfig(m discovery.PluginMeta) *plugin.ClientConfig {
13 return &plugin.ClientConfig{
14 Cmd: exec.Command(m.Path),
15 HandshakeConfig: Handshake,
21 // Client returns a plugin client for the plugin described by the given metadata.
22 func Client(m discovery.PluginMeta) *plugin.Client {
23 return plugin.NewClient(ClientConfig(m))