plugin: Establish our current plugin protocol as version 5

The main significant change here is that the package name for the proto
definition is "tfplugin5", which is important because this name is part
of the wire protocol for references to types defined in our package.

Along with that, we also move the generated package into "internal" to
make it explicit that importing the generated Go package from elsewhere is
not the right approach for externally-implemented SDKs, which should
instead vendor the proto definition they are using and generate their
own stubs to ensure that the wire protocol is the only hard dependency
between Terraform Core and plugins.

After this is merged, any provider binaries built against our
helper/schema package will need to be rebuilt so that they use the new
"tfplugin5" package name instead of "proto".

In a future commit we will include more elaborate and organized
documentation on how an external codebase might make use of our RPC
interface definition to implement an SDK, but the primary concern here
is to ensure we have the right wire package name before release.
This commit is contained in:
Martin Atkins 2018-11-19 09:39:16 -08:00
parent 1ff9a54020
commit 4fe9632f09
20 changed files with 541 additions and 460 deletions

View File

@ -90,7 +90,7 @@ generate:
# If you are working on changes to protobuf interfaces you may either use
# this target or run the individual scripts below directly.
protobuf:
bash plugin/proto/generate.sh
bash internal/tfplugin5/generate.sh
bash plans/internal/planproto/generate.sh
fmt:

View File

@ -16,8 +16,8 @@ import (
"github.com/hashicorp/terraform/config/hcl2shim"
"github.com/hashicorp/terraform/configs/configschema"
"github.com/hashicorp/terraform/helper/schema"
proto "github.com/hashicorp/terraform/internal/tfplugin5"
"github.com/hashicorp/terraform/plugin/convert"
"github.com/hashicorp/terraform/plugin/proto"
"github.com/hashicorp/terraform/terraform"
)

View File

@ -12,7 +12,7 @@ import (
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform/plugin/proto"
proto "github.com/hashicorp/terraform/internal/tfplugin5"
"github.com/hashicorp/terraform/terraform"
"github.com/zclconf/go-cty/cty"
"github.com/zclconf/go-cty/cty/msgpack"

View File

@ -4,8 +4,8 @@ import (
"log"
"github.com/hashicorp/terraform/helper/schema"
proto "github.com/hashicorp/terraform/internal/tfplugin5"
"github.com/hashicorp/terraform/plugin/convert"
"github.com/hashicorp/terraform/plugin/proto"
"github.com/hashicorp/terraform/terraform"
"github.com/zclconf/go-cty/cty"
ctyconvert "github.com/zclconf/go-cty/cty/convert"

View File

@ -1,5 +1,5 @@
package plugin
import "github.com/hashicorp/terraform/plugin/proto"
import proto "github.com/hashicorp/terraform/internal/tfplugin5"
var _ proto.ProvisionerServer = (*GRPCProvisionerServer)(nil)

View File

@ -6,8 +6,8 @@ import (
"time"
"github.com/hashicorp/terraform/helper/plugin"
proto "github.com/hashicorp/terraform/internal/tfplugin5"
tfplugin "github.com/hashicorp/terraform/plugin"
"github.com/hashicorp/terraform/plugin/proto"
"github.com/hashicorp/terraform/providers"
"github.com/hashicorp/terraform/terraform"
"google.golang.org/grpc"

View File

@ -13,4 +13,4 @@ DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
cd "$DIR"
protoc -I ./ plugin.proto --go_out=plugins=grpc:./
protoc -I ./ tfplugin5.proto --go_out=plugins=grpc:./

View File

@ -1,6 +1,24 @@
// Terraform Plugin RPC protocol version 5.0
//
// This file defines version 5.0 of the RPC protocol. To implement a plugin
// against this protocol, copy this definition into your own codebase and
// use protoc to generate stubs for your target language.
//
// This file will be updated in-place in the source Terraform repository for
// any minor versions of protocol 5, but later minor versions will always be
// backwards compatible. Breaking changes, if any are required, will come
// in a subsequent major version with its own separate proto definition.
//
// Note that only the proto files included in a release tag of Terraform are
// official protocol releases. Proto files taken from other commits may include
// incomplete changes or features that did not make it into a final release.
// In all reasonable cases, plugin developers should take the proto file from
// the tag of the most recent release of Terraform, and not from the master
// branch or any other development branch.
//
syntax = "proto3";
package proto;
package tfplugin5;
// DynamicValue is an opaque encoding of terraform data, with the field name
// indicating the encoding scheme used.

View File

@ -1,7 +1,7 @@
package convert
import (
"github.com/hashicorp/terraform/plugin/proto"
proto "github.com/hashicorp/terraform/internal/tfplugin5"
"github.com/hashicorp/terraform/tfdiags"
"github.com/zclconf/go-cty/cty"
)

View File

@ -5,7 +5,7 @@ import (
"testing"
"github.com/google/go-cmp/cmp"
"github.com/hashicorp/terraform/plugin/proto"
proto "github.com/hashicorp/terraform/internal/tfplugin5"
"github.com/hashicorp/terraform/tfdiags"
"github.com/zclconf/go-cty/cty"
)

View File

@ -6,7 +6,7 @@ import (
"sort"
"github.com/hashicorp/terraform/configs/configschema"
"github.com/hashicorp/terraform/plugin/proto"
proto "github.com/hashicorp/terraform/internal/tfplugin5"
"github.com/hashicorp/terraform/providers"
)

View File

@ -6,7 +6,7 @@ import (
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"github.com/hashicorp/terraform/configs/configschema"
"github.com/hashicorp/terraform/plugin/proto"
proto "github.com/hashicorp/terraform/internal/tfplugin5"
"github.com/zclconf/go-cty/cty"
)

View File

@ -10,8 +10,8 @@ import (
"github.com/zclconf/go-cty/cty"
plugin "github.com/hashicorp/go-plugin"
proto "github.com/hashicorp/terraform/internal/tfplugin5"
"github.com/hashicorp/terraform/plugin/convert"
"github.com/hashicorp/terraform/plugin/proto"
"github.com/hashicorp/terraform/providers"
"github.com/hashicorp/terraform/version"
"github.com/zclconf/go-cty/cty/msgpack"

View File

@ -12,8 +12,8 @@ import (
"github.com/hashicorp/terraform/tfdiags"
"github.com/zclconf/go-cty/cty"
proto "github.com/hashicorp/terraform/internal/tfplugin5"
mockproto "github.com/hashicorp/terraform/plugin/mock_proto"
"github.com/hashicorp/terraform/plugin/proto"
)
var _ providers.Interface = (*GRPCProvider)(nil)

View File

@ -9,8 +9,8 @@ import (
plugin "github.com/hashicorp/go-plugin"
"github.com/hashicorp/terraform/configs/configschema"
proto "github.com/hashicorp/terraform/internal/tfplugin5"
"github.com/hashicorp/terraform/plugin/convert"
"github.com/hashicorp/terraform/plugin/proto"
"github.com/hashicorp/terraform/provisioners"
"github.com/zclconf/go-cty/cty"
"github.com/zclconf/go-cty/cty/msgpack"

View File

@ -8,7 +8,7 @@ import (
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"github.com/hashicorp/terraform/config/hcl2shim"
"github.com/hashicorp/terraform/plugin/proto"
proto "github.com/hashicorp/terraform/internal/tfplugin5"
"github.com/hashicorp/terraform/provisioners"
"github.com/zclconf/go-cty/cty"

View File

@ -1,3 +1,3 @@
//go:generate mockgen -destination mock.go github.com/hashicorp/terraform/plugin/proto ProviderClient,ProvisionerClient,Provisioner_ProvisionResourceClient,Provisioner_ProvisionResourceServer
//go:generate mockgen -destination mock.go github.com/hashicorp/terraform/internal/tfplugin5 ProviderClient,ProvisionerClient,Provisioner_ProvisionResourceClient,Provisioner_ProvisionResourceServer
package mock_proto
package mock_tfplugin5

View File

@ -1,13 +1,13 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/hashicorp/terraform/plugin/proto (interfaces: ProviderClient,ProvisionerClient,Provisioner_ProvisionResourceClient,Provisioner_ProvisionResourceServer)
// Source: github.com/hashicorp/terraform/internal/tfplugin5 (interfaces: ProviderClient,ProvisionerClient,Provisioner_ProvisionResourceClient,Provisioner_ProvisionResourceServer)
// Package mock_proto is a generated GoMock package.
package mock_proto
// Package mock_tfplugin5 is a generated GoMock package.
package mock_tfplugin5
import (
context "context"
gomock "github.com/golang/mock/gomock"
proto "github.com/hashicorp/terraform/plugin/proto"
tfplugin5 "github.com/hashicorp/terraform/internal/tfplugin5"
grpc "google.golang.org/grpc"
metadata "google.golang.org/grpc/metadata"
reflect "reflect"
@ -37,13 +37,13 @@ func (m *MockProviderClient) EXPECT() *MockProviderClientMockRecorder {
}
// ApplyResourceChange mocks base method
func (m *MockProviderClient) ApplyResourceChange(arg0 context.Context, arg1 *proto.ApplyResourceChange_Request, arg2 ...grpc.CallOption) (*proto.ApplyResourceChange_Response, error) {
func (m *MockProviderClient) ApplyResourceChange(arg0 context.Context, arg1 *tfplugin5.ApplyResourceChange_Request, arg2 ...grpc.CallOption) (*tfplugin5.ApplyResourceChange_Response, error) {
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "ApplyResourceChange", varargs...)
ret0, _ := ret[0].(*proto.ApplyResourceChange_Response)
ret0, _ := ret[0].(*tfplugin5.ApplyResourceChange_Response)
ret1, _ := ret[1].(error)
return ret0, ret1
}
@ -55,13 +55,13 @@ func (mr *MockProviderClientMockRecorder) ApplyResourceChange(arg0, arg1 interfa
}
// Configure mocks base method
func (m *MockProviderClient) Configure(arg0 context.Context, arg1 *proto.Configure_Request, arg2 ...grpc.CallOption) (*proto.Configure_Response, error) {
func (m *MockProviderClient) Configure(arg0 context.Context, arg1 *tfplugin5.Configure_Request, arg2 ...grpc.CallOption) (*tfplugin5.Configure_Response, error) {
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "Configure", varargs...)
ret0, _ := ret[0].(*proto.Configure_Response)
ret0, _ := ret[0].(*tfplugin5.Configure_Response)
ret1, _ := ret[1].(error)
return ret0, ret1
}
@ -73,13 +73,13 @@ func (mr *MockProviderClientMockRecorder) Configure(arg0, arg1 interface{}, arg2
}
// GetSchema mocks base method
func (m *MockProviderClient) GetSchema(arg0 context.Context, arg1 *proto.GetProviderSchema_Request, arg2 ...grpc.CallOption) (*proto.GetProviderSchema_Response, error) {
func (m *MockProviderClient) GetSchema(arg0 context.Context, arg1 *tfplugin5.GetProviderSchema_Request, arg2 ...grpc.CallOption) (*tfplugin5.GetProviderSchema_Response, error) {
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "GetSchema", varargs...)
ret0, _ := ret[0].(*proto.GetProviderSchema_Response)
ret0, _ := ret[0].(*tfplugin5.GetProviderSchema_Response)
ret1, _ := ret[1].(error)
return ret0, ret1
}
@ -91,13 +91,13 @@ func (mr *MockProviderClientMockRecorder) GetSchema(arg0, arg1 interface{}, arg2
}
// ImportResourceState mocks base method
func (m *MockProviderClient) ImportResourceState(arg0 context.Context, arg1 *proto.ImportResourceState_Request, arg2 ...grpc.CallOption) (*proto.ImportResourceState_Response, error) {
func (m *MockProviderClient) ImportResourceState(arg0 context.Context, arg1 *tfplugin5.ImportResourceState_Request, arg2 ...grpc.CallOption) (*tfplugin5.ImportResourceState_Response, error) {
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "ImportResourceState", varargs...)
ret0, _ := ret[0].(*proto.ImportResourceState_Response)
ret0, _ := ret[0].(*tfplugin5.ImportResourceState_Response)
ret1, _ := ret[1].(error)
return ret0, ret1
}
@ -109,13 +109,13 @@ func (mr *MockProviderClientMockRecorder) ImportResourceState(arg0, arg1 interfa
}
// PlanResourceChange mocks base method
func (m *MockProviderClient) PlanResourceChange(arg0 context.Context, arg1 *proto.PlanResourceChange_Request, arg2 ...grpc.CallOption) (*proto.PlanResourceChange_Response, error) {
func (m *MockProviderClient) PlanResourceChange(arg0 context.Context, arg1 *tfplugin5.PlanResourceChange_Request, arg2 ...grpc.CallOption) (*tfplugin5.PlanResourceChange_Response, error) {
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "PlanResourceChange", varargs...)
ret0, _ := ret[0].(*proto.PlanResourceChange_Response)
ret0, _ := ret[0].(*tfplugin5.PlanResourceChange_Response)
ret1, _ := ret[1].(error)
return ret0, ret1
}
@ -127,13 +127,13 @@ func (mr *MockProviderClientMockRecorder) PlanResourceChange(arg0, arg1 interfac
}
// PrepareProviderConfig mocks base method
func (m *MockProviderClient) PrepareProviderConfig(arg0 context.Context, arg1 *proto.PrepareProviderConfig_Request, arg2 ...grpc.CallOption) (*proto.PrepareProviderConfig_Response, error) {
func (m *MockProviderClient) PrepareProviderConfig(arg0 context.Context, arg1 *tfplugin5.PrepareProviderConfig_Request, arg2 ...grpc.CallOption) (*tfplugin5.PrepareProviderConfig_Response, error) {
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "PrepareProviderConfig", varargs...)
ret0, _ := ret[0].(*proto.PrepareProviderConfig_Response)
ret0, _ := ret[0].(*tfplugin5.PrepareProviderConfig_Response)
ret1, _ := ret[1].(error)
return ret0, ret1
}
@ -145,13 +145,13 @@ func (mr *MockProviderClientMockRecorder) PrepareProviderConfig(arg0, arg1 inter
}
// ReadDataSource mocks base method
func (m *MockProviderClient) ReadDataSource(arg0 context.Context, arg1 *proto.ReadDataSource_Request, arg2 ...grpc.CallOption) (*proto.ReadDataSource_Response, error) {
func (m *MockProviderClient) ReadDataSource(arg0 context.Context, arg1 *tfplugin5.ReadDataSource_Request, arg2 ...grpc.CallOption) (*tfplugin5.ReadDataSource_Response, error) {
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "ReadDataSource", varargs...)
ret0, _ := ret[0].(*proto.ReadDataSource_Response)
ret0, _ := ret[0].(*tfplugin5.ReadDataSource_Response)
ret1, _ := ret[1].(error)
return ret0, ret1
}
@ -163,13 +163,13 @@ func (mr *MockProviderClientMockRecorder) ReadDataSource(arg0, arg1 interface{},
}
// ReadResource mocks base method
func (m *MockProviderClient) ReadResource(arg0 context.Context, arg1 *proto.ReadResource_Request, arg2 ...grpc.CallOption) (*proto.ReadResource_Response, error) {
func (m *MockProviderClient) ReadResource(arg0 context.Context, arg1 *tfplugin5.ReadResource_Request, arg2 ...grpc.CallOption) (*tfplugin5.ReadResource_Response, error) {
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "ReadResource", varargs...)
ret0, _ := ret[0].(*proto.ReadResource_Response)
ret0, _ := ret[0].(*tfplugin5.ReadResource_Response)
ret1, _ := ret[1].(error)
return ret0, ret1
}
@ -181,13 +181,13 @@ func (mr *MockProviderClientMockRecorder) ReadResource(arg0, arg1 interface{}, a
}
// Stop mocks base method
func (m *MockProviderClient) Stop(arg0 context.Context, arg1 *proto.Stop_Request, arg2 ...grpc.CallOption) (*proto.Stop_Response, error) {
func (m *MockProviderClient) Stop(arg0 context.Context, arg1 *tfplugin5.Stop_Request, arg2 ...grpc.CallOption) (*tfplugin5.Stop_Response, error) {
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "Stop", varargs...)
ret0, _ := ret[0].(*proto.Stop_Response)
ret0, _ := ret[0].(*tfplugin5.Stop_Response)
ret1, _ := ret[1].(error)
return ret0, ret1
}
@ -199,13 +199,13 @@ func (mr *MockProviderClientMockRecorder) Stop(arg0, arg1 interface{}, arg2 ...i
}
// UpgradeResourceState mocks base method
func (m *MockProviderClient) UpgradeResourceState(arg0 context.Context, arg1 *proto.UpgradeResourceState_Request, arg2 ...grpc.CallOption) (*proto.UpgradeResourceState_Response, error) {
func (m *MockProviderClient) UpgradeResourceState(arg0 context.Context, arg1 *tfplugin5.UpgradeResourceState_Request, arg2 ...grpc.CallOption) (*tfplugin5.UpgradeResourceState_Response, error) {
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "UpgradeResourceState", varargs...)
ret0, _ := ret[0].(*proto.UpgradeResourceState_Response)
ret0, _ := ret[0].(*tfplugin5.UpgradeResourceState_Response)
ret1, _ := ret[1].(error)
return ret0, ret1
}
@ -217,13 +217,13 @@ func (mr *MockProviderClientMockRecorder) UpgradeResourceState(arg0, arg1 interf
}
// ValidateDataSourceConfig mocks base method
func (m *MockProviderClient) ValidateDataSourceConfig(arg0 context.Context, arg1 *proto.ValidateDataSourceConfig_Request, arg2 ...grpc.CallOption) (*proto.ValidateDataSourceConfig_Response, error) {
func (m *MockProviderClient) ValidateDataSourceConfig(arg0 context.Context, arg1 *tfplugin5.ValidateDataSourceConfig_Request, arg2 ...grpc.CallOption) (*tfplugin5.ValidateDataSourceConfig_Response, error) {
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "ValidateDataSourceConfig", varargs...)
ret0, _ := ret[0].(*proto.ValidateDataSourceConfig_Response)
ret0, _ := ret[0].(*tfplugin5.ValidateDataSourceConfig_Response)
ret1, _ := ret[1].(error)
return ret0, ret1
}
@ -235,13 +235,13 @@ func (mr *MockProviderClientMockRecorder) ValidateDataSourceConfig(arg0, arg1 in
}
// ValidateResourceTypeConfig mocks base method
func (m *MockProviderClient) ValidateResourceTypeConfig(arg0 context.Context, arg1 *proto.ValidateResourceTypeConfig_Request, arg2 ...grpc.CallOption) (*proto.ValidateResourceTypeConfig_Response, error) {
func (m *MockProviderClient) ValidateResourceTypeConfig(arg0 context.Context, arg1 *tfplugin5.ValidateResourceTypeConfig_Request, arg2 ...grpc.CallOption) (*tfplugin5.ValidateResourceTypeConfig_Response, error) {
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "ValidateResourceTypeConfig", varargs...)
ret0, _ := ret[0].(*proto.ValidateResourceTypeConfig_Response)
ret0, _ := ret[0].(*tfplugin5.ValidateResourceTypeConfig_Response)
ret1, _ := ret[1].(error)
return ret0, ret1
}
@ -276,13 +276,13 @@ func (m *MockProvisionerClient) EXPECT() *MockProvisionerClientMockRecorder {
}
// GetSchema mocks base method
func (m *MockProvisionerClient) GetSchema(arg0 context.Context, arg1 *proto.GetProvisionerSchema_Request, arg2 ...grpc.CallOption) (*proto.GetProvisionerSchema_Response, error) {
func (m *MockProvisionerClient) GetSchema(arg0 context.Context, arg1 *tfplugin5.GetProvisionerSchema_Request, arg2 ...grpc.CallOption) (*tfplugin5.GetProvisionerSchema_Response, error) {
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "GetSchema", varargs...)
ret0, _ := ret[0].(*proto.GetProvisionerSchema_Response)
ret0, _ := ret[0].(*tfplugin5.GetProvisionerSchema_Response)
ret1, _ := ret[1].(error)
return ret0, ret1
}
@ -294,13 +294,13 @@ func (mr *MockProvisionerClientMockRecorder) GetSchema(arg0, arg1 interface{}, a
}
// ProvisionResource mocks base method
func (m *MockProvisionerClient) ProvisionResource(arg0 context.Context, arg1 *proto.ProvisionResource_Request, arg2 ...grpc.CallOption) (proto.Provisioner_ProvisionResourceClient, error) {
func (m *MockProvisionerClient) ProvisionResource(arg0 context.Context, arg1 *tfplugin5.ProvisionResource_Request, arg2 ...grpc.CallOption) (tfplugin5.Provisioner_ProvisionResourceClient, error) {
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "ProvisionResource", varargs...)
ret0, _ := ret[0].(proto.Provisioner_ProvisionResourceClient)
ret0, _ := ret[0].(tfplugin5.Provisioner_ProvisionResourceClient)
ret1, _ := ret[1].(error)
return ret0, ret1
}
@ -312,13 +312,13 @@ func (mr *MockProvisionerClientMockRecorder) ProvisionResource(arg0, arg1 interf
}
// Stop mocks base method
func (m *MockProvisionerClient) Stop(arg0 context.Context, arg1 *proto.Stop_Request, arg2 ...grpc.CallOption) (*proto.Stop_Response, error) {
func (m *MockProvisionerClient) Stop(arg0 context.Context, arg1 *tfplugin5.Stop_Request, arg2 ...grpc.CallOption) (*tfplugin5.Stop_Response, error) {
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "Stop", varargs...)
ret0, _ := ret[0].(*proto.Stop_Response)
ret0, _ := ret[0].(*tfplugin5.Stop_Response)
ret1, _ := ret[1].(error)
return ret0, ret1
}
@ -330,13 +330,13 @@ func (mr *MockProvisionerClientMockRecorder) Stop(arg0, arg1 interface{}, arg2 .
}
// ValidateProvisionerConfig mocks base method
func (m *MockProvisionerClient) ValidateProvisionerConfig(arg0 context.Context, arg1 *proto.ValidateProvisionerConfig_Request, arg2 ...grpc.CallOption) (*proto.ValidateProvisionerConfig_Response, error) {
func (m *MockProvisionerClient) ValidateProvisionerConfig(arg0 context.Context, arg1 *tfplugin5.ValidateProvisionerConfig_Request, arg2 ...grpc.CallOption) (*tfplugin5.ValidateProvisionerConfig_Response, error) {
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "ValidateProvisionerConfig", varargs...)
ret0, _ := ret[0].(*proto.ValidateProvisionerConfig_Response)
ret0, _ := ret[0].(*tfplugin5.ValidateProvisionerConfig_Response)
ret1, _ := ret[1].(error)
return ret0, ret1
}
@ -408,9 +408,9 @@ func (mr *MockProvisioner_ProvisionResourceClientMockRecorder) Header() *gomock.
}
// Recv mocks base method
func (m *MockProvisioner_ProvisionResourceClient) Recv() (*proto.ProvisionResource_Response, error) {
func (m *MockProvisioner_ProvisionResourceClient) Recv() (*tfplugin5.ProvisionResource_Response, error) {
ret := m.ctrl.Call(m, "Recv")
ret0, _ := ret[0].(*proto.ProvisionResource_Response)
ret0, _ := ret[0].(*tfplugin5.ProvisionResource_Response)
ret1, _ := ret[1].(error)
return ret0, ret1
}
@ -504,7 +504,7 @@ func (mr *MockProvisioner_ProvisionResourceServerMockRecorder) RecvMsg(arg0 inte
}
// Send mocks base method
func (m *MockProvisioner_ProvisionResourceServer) Send(arg0 *proto.ProvisionResource_Response) error {
func (m *MockProvisioner_ProvisionResourceServer) Send(arg0 *tfplugin5.ProvisionResource_Response) error {
ret := m.ctrl.Call(m, "Send", arg0)
ret0, _ := ret[0].(error)
return ret0

View File

@ -3,7 +3,7 @@ package plugin
import (
"github.com/hashicorp/go-plugin"
grpcplugin "github.com/hashicorp/terraform/helper/plugin"
"github.com/hashicorp/terraform/plugin/proto"
proto "github.com/hashicorp/terraform/internal/tfplugin5"
"github.com/hashicorp/terraform/terraform"
)