Move plugin/ and plugin6/ to internal/plugin{,6}/
This is part of a general effort to move all of Terraform's non-library package surface under internal in order to reinforce that these are for internal use within Terraform only. If you were previously importing packages under this prefix into an external codebase, you could pin to an earlier release tag as an interim solution until you've make a plan to achieve the same functionality some other way.
This commit is contained in:
parent
034e944070
commit
b40a4fb741
|
@ -16,8 +16,8 @@ import (
|
|||
"github.com/hashicorp/terraform/internal/command/views"
|
||||
"github.com/hashicorp/terraform/internal/command/webbrowser"
|
||||
"github.com/hashicorp/terraform/internal/getproviders"
|
||||
pluginDiscovery "github.com/hashicorp/terraform/internal/plugin/discovery"
|
||||
"github.com/hashicorp/terraform/internal/terminal"
|
||||
pluginDiscovery "github.com/hashicorp/terraform/plugin/discovery"
|
||||
)
|
||||
|
||||
// runningInAutomationEnvName gives the name of an environment variable that
|
||||
|
|
|
@ -15,8 +15,8 @@ import (
|
|||
svchost "github.com/hashicorp/terraform-svchost"
|
||||
svcauth "github.com/hashicorp/terraform-svchost/auth"
|
||||
"github.com/hashicorp/terraform/internal/configs/hcl2shim"
|
||||
pluginDiscovery "github.com/hashicorp/terraform/internal/plugin/discovery"
|
||||
"github.com/hashicorp/terraform/internal/replacefile"
|
||||
pluginDiscovery "github.com/hashicorp/terraform/plugin/discovery"
|
||||
)
|
||||
|
||||
// credentialsConfigFile returns the path for the special configuration file
|
||||
|
|
|
@ -13,9 +13,9 @@ import (
|
|||
"github.com/hashicorp/go-plugin"
|
||||
"github.com/hashicorp/terraform/internal/e2e"
|
||||
"github.com/hashicorp/terraform/internal/grpcwrap"
|
||||
tfplugin "github.com/hashicorp/terraform/internal/plugin"
|
||||
simple "github.com/hashicorp/terraform/internal/provider-simple"
|
||||
proto "github.com/hashicorp/terraform/internal/tfplugin5"
|
||||
tfplugin "github.com/hashicorp/terraform/plugin"
|
||||
)
|
||||
|
||||
// The tests in this file are for the "unmanaged provider workflow", which
|
||||
|
|
|
@ -16,11 +16,11 @@ import (
|
|||
"github.com/hashicorp/terraform/internal/getproviders"
|
||||
"github.com/hashicorp/terraform/internal/logging"
|
||||
"github.com/hashicorp/terraform/internal/moduletest"
|
||||
tfplugin "github.com/hashicorp/terraform/internal/plugin"
|
||||
tfplugin6 "github.com/hashicorp/terraform/internal/plugin6"
|
||||
"github.com/hashicorp/terraform/internal/providercache"
|
||||
"github.com/hashicorp/terraform/internal/providers"
|
||||
"github.com/hashicorp/terraform/internal/tfdiags"
|
||||
tfplugin "github.com/hashicorp/terraform/plugin"
|
||||
tfplugin6 "github.com/hashicorp/terraform/plugin6"
|
||||
)
|
||||
|
||||
// The TF_DISABLE_PLUGIN_TLS environment variable is intended only for use by
|
||||
|
|
|
@ -17,9 +17,9 @@ import (
|
|||
localexec "github.com/hashicorp/terraform/internal/builtin/provisioners/local-exec"
|
||||
remoteexec "github.com/hashicorp/terraform/internal/builtin/provisioners/remote-exec"
|
||||
"github.com/hashicorp/terraform/internal/logging"
|
||||
tfplugin "github.com/hashicorp/terraform/internal/plugin"
|
||||
"github.com/hashicorp/terraform/internal/plugin/discovery"
|
||||
"github.com/hashicorp/terraform/internal/provisioners"
|
||||
tfplugin "github.com/hashicorp/terraform/plugin"
|
||||
"github.com/hashicorp/terraform/plugin/discovery"
|
||||
)
|
||||
|
||||
// NOTE WELL: The logic in this file is primarily about plugin types OTHER THAN
|
||||
|
|
|
@ -9,8 +9,8 @@ import (
|
|||
"github.com/hashicorp/terraform/internal/addrs"
|
||||
"github.com/hashicorp/terraform/internal/getproviders"
|
||||
"github.com/hashicorp/terraform/internal/moduledeps"
|
||||
"github.com/hashicorp/terraform/internal/plugin/discovery"
|
||||
"github.com/hashicorp/terraform/internal/tfdiags"
|
||||
"github.com/hashicorp/terraform/plugin/discovery"
|
||||
)
|
||||
|
||||
// A Config is a node in the tree of modules within a configuration.
|
||||
|
|
|
@ -3,9 +3,9 @@ package grpcwrap
|
|||
import (
|
||||
"context"
|
||||
|
||||
"github.com/hashicorp/terraform/internal/plugin/convert"
|
||||
"github.com/hashicorp/terraform/internal/providers"
|
||||
"github.com/hashicorp/terraform/internal/tfplugin5"
|
||||
"github.com/hashicorp/terraform/plugin/convert"
|
||||
"github.com/zclconf/go-cty/cty"
|
||||
ctyjson "github.com/zclconf/go-cty/cty/json"
|
||||
"github.com/zclconf/go-cty/cty/msgpack"
|
||||
|
|
|
@ -3,9 +3,9 @@ package grpcwrap
|
|||
import (
|
||||
"context"
|
||||
|
||||
"github.com/hashicorp/terraform/internal/plugin6/convert"
|
||||
"github.com/hashicorp/terraform/internal/providers"
|
||||
"github.com/hashicorp/terraform/internal/tfplugin6"
|
||||
"github.com/hashicorp/terraform/plugin6/convert"
|
||||
"github.com/zclconf/go-cty/cty"
|
||||
ctyjson "github.com/zclconf/go-cty/cty/json"
|
||||
"github.com/zclconf/go-cty/cty/msgpack"
|
||||
|
|
|
@ -8,9 +8,9 @@ import (
|
|||
|
||||
"github.com/hashicorp/terraform/internal/communicator/shared"
|
||||
"github.com/hashicorp/terraform/internal/configs/configschema"
|
||||
"github.com/hashicorp/terraform/internal/plugin/convert"
|
||||
"github.com/hashicorp/terraform/internal/provisioners"
|
||||
"github.com/hashicorp/terraform/internal/tfplugin5"
|
||||
"github.com/hashicorp/terraform/plugin/convert"
|
||||
)
|
||||
|
||||
// New wraps a provisioners.Interface to implement a grpc ProviderServer.
|
||||
|
|
|
@ -2,7 +2,7 @@ package moduledeps
|
|||
|
||||
import (
|
||||
"github.com/hashicorp/terraform/internal/addrs"
|
||||
"github.com/hashicorp/terraform/plugin/discovery"
|
||||
"github.com/hashicorp/terraform/internal/plugin/discovery"
|
||||
)
|
||||
|
||||
// Providers describes a set of provider dependencies for a given module.
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/hashicorp/terraform/plugin/discovery"
|
||||
"github.com/hashicorp/terraform/internal/plugin/discovery"
|
||||
)
|
||||
|
||||
// Module represents the dependencies of a single module, as well being
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/hashicorp/terraform/internal/addrs"
|
||||
"github.com/hashicorp/terraform/plugin/discovery"
|
||||
"github.com/hashicorp/terraform/internal/plugin/discovery"
|
||||
)
|
||||
|
||||
func TestModuleWalkTree(t *testing.T) {
|
||||
|
|
|
@ -9,9 +9,9 @@ import (
|
|||
|
||||
plugin "github.com/hashicorp/go-plugin"
|
||||
"github.com/hashicorp/terraform/internal/logging"
|
||||
"github.com/hashicorp/terraform/internal/plugin/convert"
|
||||
"github.com/hashicorp/terraform/internal/providers"
|
||||
proto "github.com/hashicorp/terraform/internal/tfplugin5"
|
||||
"github.com/hashicorp/terraform/plugin/convert"
|
||||
ctyjson "github.com/zclconf/go-cty/cty/json"
|
||||
"github.com/zclconf/go-cty/cty/msgpack"
|
||||
"google.golang.org/grpc"
|
|
@ -12,8 +12,8 @@ import (
|
|||
"github.com/hashicorp/terraform/internal/tfdiags"
|
||||
"github.com/zclconf/go-cty/cty"
|
||||
|
||||
mockproto "github.com/hashicorp/terraform/internal/plugin/mock_proto"
|
||||
proto "github.com/hashicorp/terraform/internal/tfplugin5"
|
||||
mockproto "github.com/hashicorp/terraform/plugin/mock_proto"
|
||||
)
|
||||
|
||||
var _ providers.Interface = (*GRPCProvider)(nil)
|
|
@ -8,9 +8,9 @@ import (
|
|||
|
||||
plugin "github.com/hashicorp/go-plugin"
|
||||
"github.com/hashicorp/terraform/internal/configs/configschema"
|
||||
"github.com/hashicorp/terraform/internal/plugin/convert"
|
||||
"github.com/hashicorp/terraform/internal/provisioners"
|
||||
proto "github.com/hashicorp/terraform/internal/tfplugin5"
|
||||
"github.com/hashicorp/terraform/plugin/convert"
|
||||
"github.com/zclconf/go-cty/cty"
|
||||
"github.com/zclconf/go-cty/cty/msgpack"
|
||||
"google.golang.org/grpc"
|
|
@ -12,7 +12,7 @@ import (
|
|||
proto "github.com/hashicorp/terraform/internal/tfplugin5"
|
||||
"github.com/zclconf/go-cty/cty"
|
||||
|
||||
mockproto "github.com/hashicorp/terraform/plugin/mock_proto"
|
||||
mockproto "github.com/hashicorp/terraform/internal/plugin/mock_proto"
|
||||
)
|
||||
|
||||
var _ provisioners.Interface = (*GRPCProvisioner)(nil)
|
|
@ -2,7 +2,7 @@ package plugin
|
|||
|
||||
import (
|
||||
"github.com/hashicorp/go-plugin"
|
||||
"github.com/hashicorp/terraform/plugin6"
|
||||
"github.com/hashicorp/terraform/internal/plugin6"
|
||||
)
|
||||
|
||||
// VersionedPlugins includes both protocol 5 and 6 because this is the function
|
|
@ -9,9 +9,9 @@ import (
|
|||
|
||||
plugin "github.com/hashicorp/go-plugin"
|
||||
"github.com/hashicorp/terraform/internal/logging"
|
||||
"github.com/hashicorp/terraform/internal/plugin6/convert"
|
||||
"github.com/hashicorp/terraform/internal/providers"
|
||||
proto6 "github.com/hashicorp/terraform/internal/tfplugin6"
|
||||
"github.com/hashicorp/terraform/plugin6/convert"
|
||||
ctyjson "github.com/zclconf/go-cty/cty/json"
|
||||
"github.com/zclconf/go-cty/cty/msgpack"
|
||||
"google.golang.org/grpc"
|
|
@ -13,8 +13,8 @@ import (
|
|||
"github.com/hashicorp/terraform/internal/tfdiags"
|
||||
"github.com/zclconf/go-cty/cty"
|
||||
|
||||
mockproto "github.com/hashicorp/terraform/internal/plugin6/mock_proto"
|
||||
proto "github.com/hashicorp/terraform/internal/tfplugin6"
|
||||
mockproto "github.com/hashicorp/terraform/plugin6/mock_proto"
|
||||
)
|
||||
|
||||
var _ providers.Interface = (*GRPCProvider)(nil)
|
|
@ -2,9 +2,9 @@ package main
|
|||
|
||||
import (
|
||||
"github.com/hashicorp/terraform/internal/grpcwrap"
|
||||
plugin "github.com/hashicorp/terraform/internal/plugin6"
|
||||
simple "github.com/hashicorp/terraform/internal/provider-simple-v6"
|
||||
"github.com/hashicorp/terraform/internal/tfplugin6"
|
||||
plugin "github.com/hashicorp/terraform/plugin6"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -2,9 +2,9 @@ package main
|
|||
|
||||
import (
|
||||
"github.com/hashicorp/terraform/internal/grpcwrap"
|
||||
"github.com/hashicorp/terraform/internal/plugin"
|
||||
simple "github.com/hashicorp/terraform/internal/provider-simple"
|
||||
"github.com/hashicorp/terraform/internal/tfplugin5"
|
||||
"github.com/hashicorp/terraform/plugin"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -3,8 +3,8 @@ package main
|
|||
import (
|
||||
"github.com/hashicorp/terraform/internal/builtin/providers/terraform"
|
||||
"github.com/hashicorp/terraform/internal/grpcwrap"
|
||||
"github.com/hashicorp/terraform/internal/plugin"
|
||||
"github.com/hashicorp/terraform/internal/tfplugin5"
|
||||
"github.com/hashicorp/terraform/plugin"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -3,8 +3,8 @@ package main
|
|||
import (
|
||||
localexec "github.com/hashicorp/terraform/internal/builtin/provisioners/local-exec"
|
||||
"github.com/hashicorp/terraform/internal/grpcwrap"
|
||||
"github.com/hashicorp/terraform/internal/plugin"
|
||||
"github.com/hashicorp/terraform/internal/tfplugin5"
|
||||
"github.com/hashicorp/terraform/plugin"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
"github.com/hashicorp/hcl"
|
||||
"github.com/hashicorp/terraform/internal/addrs"
|
||||
"github.com/hashicorp/terraform/internal/getproviders"
|
||||
"github.com/hashicorp/terraform/plugin/discovery"
|
||||
"github.com/hashicorp/terraform/internal/plugin/discovery"
|
||||
)
|
||||
|
||||
var zeroThirteen = discovery.ConstraintStr(">= 0.13.0").MustParse()
|
||||
|
|
|
@ -19,9 +19,9 @@ import (
|
|||
"github.com/hashicorp/terraform/internal/depsfile"
|
||||
"github.com/hashicorp/terraform/internal/getproviders"
|
||||
"github.com/hashicorp/terraform/internal/httpclient"
|
||||
discovery "github.com/hashicorp/terraform/internal/plugin/discovery"
|
||||
"github.com/hashicorp/terraform/internal/providercache"
|
||||
"github.com/hashicorp/terraform/internal/tfdiags"
|
||||
discovery "github.com/hashicorp/terraform/plugin/discovery"
|
||||
"github.com/hashicorp/terraform/version"
|
||||
"github.com/mitchellh/cli"
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue