From 36719af44e9a033bc12e3526083ae90ea983b857 Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Fri, 6 Dec 2019 17:47:43 -0800 Subject: [PATCH] internal/tfcore1: start of stubbing an RPC interface for Terraform Core This is a prototype of what it might look like for Terraform Core to be a physically-separate architectural component from Terraform CLI, with the two interacting over an explicit RPC channel rather than directly in-process. --- Makefile | 1 + internal/tfcore1/generate.sh | 16 + internal/tfcore1/tfcore1.pb.go | 1984 ++++++++++++++++++++++++++++++++ internal/tfcore1/tfcore1.proto | 295 +++++ 4 files changed, 2296 insertions(+) create mode 100644 internal/tfcore1/generate.sh create mode 100644 internal/tfcore1/tfcore1.pb.go create mode 100644 internal/tfcore1/tfcore1.proto diff --git a/Makefile b/Makefile index 7bae9ae359..0d743b4c2b 100644 --- a/Makefile +++ b/Makefile @@ -82,6 +82,7 @@ generate: protobuf: bash scripts/protobuf-check.sh bash internal/tfplugin5/generate.sh + bash internal/tfcore1/generate.sh bash plans/internal/planproto/generate.sh fmt: diff --git a/internal/tfcore1/generate.sh b/internal/tfcore1/generate.sh new file mode 100644 index 0000000000..a99122243a --- /dev/null +++ b/internal/tfcore1/generate.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# We do not run protoc under go:generate because we want to ensure that all +# dependencies of go:generate are "go get"-able for general dev environment +# usability. To compile all protobuf files in this repository, run +# "make protobuf" at the top-level. + +set -eu + +SOURCE="${BASH_SOURCE[0]}" +while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done +DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" + +cd "$DIR" + +protoc -I ./ tfcore1.proto --go_out=plugins=grpc:./ diff --git a/internal/tfcore1/tfcore1.pb.go b/internal/tfcore1/tfcore1.pb.go new file mode 100644 index 0000000000..84bc102fa3 --- /dev/null +++ b/internal/tfcore1/tfcore1.pb.go @@ -0,0 +1,1984 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: tfcore1.proto + +package tfcore1 + +import ( + context "context" + fmt "fmt" + proto "github.com/golang/protobuf/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +type ResourceInstanceAddr_Mode int32 + +const ( + ResourceInstanceAddr_INVALID ResourceInstanceAddr_Mode = 0 + ResourceInstanceAddr_MANAGED ResourceInstanceAddr_Mode = 1 + ResourceInstanceAddr_DATA ResourceInstanceAddr_Mode = 2 +) + +var ResourceInstanceAddr_Mode_name = map[int32]string{ + 0: "INVALID", + 1: "MANAGED", + 2: "DATA", +} + +var ResourceInstanceAddr_Mode_value = map[string]int32{ + "INVALID": 0, + "MANAGED": 1, + "DATA": 2, +} + +func (x ResourceInstanceAddr_Mode) String() string { + return proto.EnumName(ResourceInstanceAddr_Mode_name, int32(x)) +} + +func (ResourceInstanceAddr_Mode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_f2d875fbd4c0191c, []int{6, 0} +} + +type Diagnostic_Severity int32 + +const ( + Diagnostic_INVALID Diagnostic_Severity = 0 + Diagnostic_ERROR Diagnostic_Severity = 1 + Diagnostic_WARNING Diagnostic_Severity = 2 +) + +var Diagnostic_Severity_name = map[int32]string{ + 0: "INVALID", + 1: "ERROR", + 2: "WARNING", +} + +var Diagnostic_Severity_value = map[string]int32{ + "INVALID": 0, + "ERROR": 1, + "WARNING": 2, +} + +func (x Diagnostic_Severity) String() string { + return proto.EnumName(Diagnostic_Severity_name, int32(x)) +} + +func (Diagnostic_Severity) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_f2d875fbd4c0191c, []int{8, 0} +} + +type Validate struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Validate) Reset() { *m = Validate{} } +func (m *Validate) String() string { return proto.CompactTextString(m) } +func (*Validate) ProtoMessage() {} +func (*Validate) Descriptor() ([]byte, []int) { + return fileDescriptor_f2d875fbd4c0191c, []int{0} +} + +func (m *Validate) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Validate.Unmarshal(m, b) +} +func (m *Validate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Validate.Marshal(b, m, deterministic) +} +func (m *Validate) XXX_Merge(src proto.Message) { + xxx_messageInfo_Validate.Merge(m, src) +} +func (m *Validate) XXX_Size() int { + return xxx_messageInfo_Validate.Size(m) +} +func (m *Validate) XXX_DiscardUnknown() { + xxx_messageInfo_Validate.DiscardUnknown(m) +} + +var xxx_messageInfo_Validate proto.InternalMessageInfo + +type Validate_Request struct { + Dependencies *Dependencies `protobuf:"bytes,1,opt,name=dependencies,proto3" json:"dependencies,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Validate_Request) Reset() { *m = Validate_Request{} } +func (m *Validate_Request) String() string { return proto.CompactTextString(m) } +func (*Validate_Request) ProtoMessage() {} +func (*Validate_Request) Descriptor() ([]byte, []int) { + return fileDescriptor_f2d875fbd4c0191c, []int{0, 0} +} + +func (m *Validate_Request) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Validate_Request.Unmarshal(m, b) +} +func (m *Validate_Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Validate_Request.Marshal(b, m, deterministic) +} +func (m *Validate_Request) XXX_Merge(src proto.Message) { + xxx_messageInfo_Validate_Request.Merge(m, src) +} +func (m *Validate_Request) XXX_Size() int { + return xxx_messageInfo_Validate_Request.Size(m) +} +func (m *Validate_Request) XXX_DiscardUnknown() { + xxx_messageInfo_Validate_Request.DiscardUnknown(m) +} + +var xxx_messageInfo_Validate_Request proto.InternalMessageInfo + +func (m *Validate_Request) GetDependencies() *Dependencies { + if m != nil { + return m.Dependencies + } + return nil +} + +type Validate_Response struct { + Diagnostics []*Diagnostic `protobuf:"bytes,2048,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Validate_Response) Reset() { *m = Validate_Response{} } +func (m *Validate_Response) String() string { return proto.CompactTextString(m) } +func (*Validate_Response) ProtoMessage() {} +func (*Validate_Response) Descriptor() ([]byte, []int) { + return fileDescriptor_f2d875fbd4c0191c, []int{0, 1} +} + +func (m *Validate_Response) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Validate_Response.Unmarshal(m, b) +} +func (m *Validate_Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Validate_Response.Marshal(b, m, deterministic) +} +func (m *Validate_Response) XXX_Merge(src proto.Message) { + xxx_messageInfo_Validate_Response.Merge(m, src) +} +func (m *Validate_Response) XXX_Size() int { + return xxx_messageInfo_Validate_Response.Size(m) +} +func (m *Validate_Response) XXX_DiscardUnknown() { + xxx_messageInfo_Validate_Response.DiscardUnknown(m) +} + +var xxx_messageInfo_Validate_Response proto.InternalMessageInfo + +func (m *Validate_Response) GetDiagnostics() []*Diagnostic { + if m != nil { + return m.Diagnostics + } + return nil +} + +type Plan struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Plan) Reset() { *m = Plan{} } +func (m *Plan) String() string { return proto.CompactTextString(m) } +func (*Plan) ProtoMessage() {} +func (*Plan) Descriptor() ([]byte, []int) { + return fileDescriptor_f2d875fbd4c0191c, []int{1} +} + +func (m *Plan) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Plan.Unmarshal(m, b) +} +func (m *Plan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Plan.Marshal(b, m, deterministic) +} +func (m *Plan) XXX_Merge(src proto.Message) { + xxx_messageInfo_Plan.Merge(m, src) +} +func (m *Plan) XXX_Size() int { + return xxx_messageInfo_Plan.Size(m) +} +func (m *Plan) XXX_DiscardUnknown() { + xxx_messageInfo_Plan.DiscardUnknown(m) +} + +var xxx_messageInfo_Plan proto.InternalMessageInfo + +type Plan_Request struct { + Dependencies *Dependencies `protobuf:"bytes,1,opt,name=dependencies,proto3" json:"dependencies,omitempty"` + PriorState []byte `protobuf:"bytes,2,opt,name=prior_state,json=priorState,proto3" json:"prior_state,omitempty"` + VariableValues map[string]*DynamicValue `protobuf:"bytes,3,rep,name=variable_values,json=variableValues,proto3" json:"variable_values,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Plan_Request) Reset() { *m = Plan_Request{} } +func (m *Plan_Request) String() string { return proto.CompactTextString(m) } +func (*Plan_Request) ProtoMessage() {} +func (*Plan_Request) Descriptor() ([]byte, []int) { + return fileDescriptor_f2d875fbd4c0191c, []int{1, 0} +} + +func (m *Plan_Request) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Plan_Request.Unmarshal(m, b) +} +func (m *Plan_Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Plan_Request.Marshal(b, m, deterministic) +} +func (m *Plan_Request) XXX_Merge(src proto.Message) { + xxx_messageInfo_Plan_Request.Merge(m, src) +} +func (m *Plan_Request) XXX_Size() int { + return xxx_messageInfo_Plan_Request.Size(m) +} +func (m *Plan_Request) XXX_DiscardUnknown() { + xxx_messageInfo_Plan_Request.DiscardUnknown(m) +} + +var xxx_messageInfo_Plan_Request proto.InternalMessageInfo + +func (m *Plan_Request) GetDependencies() *Dependencies { + if m != nil { + return m.Dependencies + } + return nil +} + +func (m *Plan_Request) GetPriorState() []byte { + if m != nil { + return m.PriorState + } + return nil +} + +func (m *Plan_Request) GetVariableValues() map[string]*DynamicValue { + if m != nil { + return m.VariableValues + } + return nil +} + +type Plan_ResponseItem struct { + // Types that are valid to be assigned to Event: + // *Plan_ResponseItem_Progress + // *Plan_ResponseItem_BeginResourceInstancePlan + // *Plan_ResponseItem_EndResourceInstancePlan + // *Plan_ResponseItem_FinalPlan + // *Plan_ResponseItem_Diagnostic + Event isPlan_ResponseItem_Event `protobuf_oneof:"event"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Plan_ResponseItem) Reset() { *m = Plan_ResponseItem{} } +func (m *Plan_ResponseItem) String() string { return proto.CompactTextString(m) } +func (*Plan_ResponseItem) ProtoMessage() {} +func (*Plan_ResponseItem) Descriptor() ([]byte, []int) { + return fileDescriptor_f2d875fbd4c0191c, []int{1, 1} +} + +func (m *Plan_ResponseItem) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Plan_ResponseItem.Unmarshal(m, b) +} +func (m *Plan_ResponseItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Plan_ResponseItem.Marshal(b, m, deterministic) +} +func (m *Plan_ResponseItem) XXX_Merge(src proto.Message) { + xxx_messageInfo_Plan_ResponseItem.Merge(m, src) +} +func (m *Plan_ResponseItem) XXX_Size() int { + return xxx_messageInfo_Plan_ResponseItem.Size(m) +} +func (m *Plan_ResponseItem) XXX_DiscardUnknown() { + xxx_messageInfo_Plan_ResponseItem.DiscardUnknown(m) +} + +var xxx_messageInfo_Plan_ResponseItem proto.InternalMessageInfo + +type isPlan_ResponseItem_Event interface { + isPlan_ResponseItem_Event() +} + +type Plan_ResponseItem_Progress struct { + Progress *Plan_OverallProgressEvent `protobuf:"bytes,1,opt,name=progress,proto3,oneof"` +} + +type Plan_ResponseItem_BeginResourceInstancePlan struct { + BeginResourceInstancePlan *Plan_BeginResourceInstancePlanEvent `protobuf:"bytes,2,opt,name=begin_resource_instance_plan,json=beginResourceInstancePlan,proto3,oneof"` +} + +type Plan_ResponseItem_EndResourceInstancePlan struct { + EndResourceInstancePlan *Plan_EndResourceInstancePlanEvent `protobuf:"bytes,3,opt,name=end_resource_instance_plan,json=endResourceInstancePlan,proto3,oneof"` +} + +type Plan_ResponseItem_FinalPlan struct { + FinalPlan *Plan_FinalPlanEvent `protobuf:"bytes,16,opt,name=final_plan,json=finalPlan,proto3,oneof"` +} + +type Plan_ResponseItem_Diagnostic struct { + Diagnostic *Diagnostic `protobuf:"bytes,2048,opt,name=diagnostic,proto3,oneof"` +} + +func (*Plan_ResponseItem_Progress) isPlan_ResponseItem_Event() {} + +func (*Plan_ResponseItem_BeginResourceInstancePlan) isPlan_ResponseItem_Event() {} + +func (*Plan_ResponseItem_EndResourceInstancePlan) isPlan_ResponseItem_Event() {} + +func (*Plan_ResponseItem_FinalPlan) isPlan_ResponseItem_Event() {} + +func (*Plan_ResponseItem_Diagnostic) isPlan_ResponseItem_Event() {} + +func (m *Plan_ResponseItem) GetEvent() isPlan_ResponseItem_Event { + if m != nil { + return m.Event + } + return nil +} + +func (m *Plan_ResponseItem) GetProgress() *Plan_OverallProgressEvent { + if x, ok := m.GetEvent().(*Plan_ResponseItem_Progress); ok { + return x.Progress + } + return nil +} + +func (m *Plan_ResponseItem) GetBeginResourceInstancePlan() *Plan_BeginResourceInstancePlanEvent { + if x, ok := m.GetEvent().(*Plan_ResponseItem_BeginResourceInstancePlan); ok { + return x.BeginResourceInstancePlan + } + return nil +} + +func (m *Plan_ResponseItem) GetEndResourceInstancePlan() *Plan_EndResourceInstancePlanEvent { + if x, ok := m.GetEvent().(*Plan_ResponseItem_EndResourceInstancePlan); ok { + return x.EndResourceInstancePlan + } + return nil +} + +func (m *Plan_ResponseItem) GetFinalPlan() *Plan_FinalPlanEvent { + if x, ok := m.GetEvent().(*Plan_ResponseItem_FinalPlan); ok { + return x.FinalPlan + } + return nil +} + +func (m *Plan_ResponseItem) GetDiagnostic() *Diagnostic { + if x, ok := m.GetEvent().(*Plan_ResponseItem_Diagnostic); ok { + return x.Diagnostic + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*Plan_ResponseItem) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*Plan_ResponseItem_Progress)(nil), + (*Plan_ResponseItem_BeginResourceInstancePlan)(nil), + (*Plan_ResponseItem_EndResourceInstancePlan)(nil), + (*Plan_ResponseItem_FinalPlan)(nil), + (*Plan_ResponseItem_Diagnostic)(nil), + } +} + +type Plan_OverallProgressEvent struct { + // percent_complete is an estimate of how much of the plan operation + // has completed, from 0 to 100 inclusive. Frontends could use this + // to show an indicative progress bar. Until an OverallProgressEvent + // is received a frontend should use an indefinite progress indicator + // to indicate that work is ongoing. + PercentComplete int32 `protobuf:"varint,1,opt,name=percent_complete,json=percentComplete,proto3" json:"percent_complete,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Plan_OverallProgressEvent) Reset() { *m = Plan_OverallProgressEvent{} } +func (m *Plan_OverallProgressEvent) String() string { return proto.CompactTextString(m) } +func (*Plan_OverallProgressEvent) ProtoMessage() {} +func (*Plan_OverallProgressEvent) Descriptor() ([]byte, []int) { + return fileDescriptor_f2d875fbd4c0191c, []int{1, 2} +} + +func (m *Plan_OverallProgressEvent) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Plan_OverallProgressEvent.Unmarshal(m, b) +} +func (m *Plan_OverallProgressEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Plan_OverallProgressEvent.Marshal(b, m, deterministic) +} +func (m *Plan_OverallProgressEvent) XXX_Merge(src proto.Message) { + xxx_messageInfo_Plan_OverallProgressEvent.Merge(m, src) +} +func (m *Plan_OverallProgressEvent) XXX_Size() int { + return xxx_messageInfo_Plan_OverallProgressEvent.Size(m) +} +func (m *Plan_OverallProgressEvent) XXX_DiscardUnknown() { + xxx_messageInfo_Plan_OverallProgressEvent.DiscardUnknown(m) +} + +var xxx_messageInfo_Plan_OverallProgressEvent proto.InternalMessageInfo + +func (m *Plan_OverallProgressEvent) GetPercentComplete() int32 { + if m != nil { + return m.PercentComplete + } + return 0 +} + +type Plan_BeginResourceInstancePlanEvent struct { + ResourceInstance *ResourceInstanceAddr `protobuf:"bytes,1,opt,name=resource_instance,json=resourceInstance,proto3" json:"resource_instance,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Plan_BeginResourceInstancePlanEvent) Reset() { *m = Plan_BeginResourceInstancePlanEvent{} } +func (m *Plan_BeginResourceInstancePlanEvent) String() string { return proto.CompactTextString(m) } +func (*Plan_BeginResourceInstancePlanEvent) ProtoMessage() {} +func (*Plan_BeginResourceInstancePlanEvent) Descriptor() ([]byte, []int) { + return fileDescriptor_f2d875fbd4c0191c, []int{1, 3} +} + +func (m *Plan_BeginResourceInstancePlanEvent) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Plan_BeginResourceInstancePlanEvent.Unmarshal(m, b) +} +func (m *Plan_BeginResourceInstancePlanEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Plan_BeginResourceInstancePlanEvent.Marshal(b, m, deterministic) +} +func (m *Plan_BeginResourceInstancePlanEvent) XXX_Merge(src proto.Message) { + xxx_messageInfo_Plan_BeginResourceInstancePlanEvent.Merge(m, src) +} +func (m *Plan_BeginResourceInstancePlanEvent) XXX_Size() int { + return xxx_messageInfo_Plan_BeginResourceInstancePlanEvent.Size(m) +} +func (m *Plan_BeginResourceInstancePlanEvent) XXX_DiscardUnknown() { + xxx_messageInfo_Plan_BeginResourceInstancePlanEvent.DiscardUnknown(m) +} + +var xxx_messageInfo_Plan_BeginResourceInstancePlanEvent proto.InternalMessageInfo + +func (m *Plan_BeginResourceInstancePlanEvent) GetResourceInstance() *ResourceInstanceAddr { + if m != nil { + return m.ResourceInstance + } + return nil +} + +type Plan_EndResourceInstancePlanEvent struct { + ResourceInstance *ResourceInstanceAddr `protobuf:"bytes,1,opt,name=resource_instance,json=resourceInstance,proto3" json:"resource_instance,omitempty"` + // failed is set to true if the planning for this instance was + // unsuccessful. Such an event is likely to be closely followed by + // one or more DiagnosticEvent messages describing the failure; + // this flag is present to allow a frontend to show explicitly which + // resource instance(s) failed, alongside the error messages. + Failed bool `protobuf:"varint,2048,opt,name=failed,proto3" json:"failed,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Plan_EndResourceInstancePlanEvent) Reset() { *m = Plan_EndResourceInstancePlanEvent{} } +func (m *Plan_EndResourceInstancePlanEvent) String() string { return proto.CompactTextString(m) } +func (*Plan_EndResourceInstancePlanEvent) ProtoMessage() {} +func (*Plan_EndResourceInstancePlanEvent) Descriptor() ([]byte, []int) { + return fileDescriptor_f2d875fbd4c0191c, []int{1, 4} +} + +func (m *Plan_EndResourceInstancePlanEvent) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Plan_EndResourceInstancePlanEvent.Unmarshal(m, b) +} +func (m *Plan_EndResourceInstancePlanEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Plan_EndResourceInstancePlanEvent.Marshal(b, m, deterministic) +} +func (m *Plan_EndResourceInstancePlanEvent) XXX_Merge(src proto.Message) { + xxx_messageInfo_Plan_EndResourceInstancePlanEvent.Merge(m, src) +} +func (m *Plan_EndResourceInstancePlanEvent) XXX_Size() int { + return xxx_messageInfo_Plan_EndResourceInstancePlanEvent.Size(m) +} +func (m *Plan_EndResourceInstancePlanEvent) XXX_DiscardUnknown() { + xxx_messageInfo_Plan_EndResourceInstancePlanEvent.DiscardUnknown(m) +} + +var xxx_messageInfo_Plan_EndResourceInstancePlanEvent proto.InternalMessageInfo + +func (m *Plan_EndResourceInstancePlanEvent) GetResourceInstance() *ResourceInstanceAddr { + if m != nil { + return m.ResourceInstance + } + return nil +} + +func (m *Plan_EndResourceInstancePlanEvent) GetFailed() bool { + if m != nil { + return m.Failed + } + return false +} + +type Plan_FinalPlanEvent struct { + // TODO: What format shall we use to communicate the plan to the + // client? + Plan []byte `protobuf:"bytes,1,opt,name=plan,proto3" json:"plan,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Plan_FinalPlanEvent) Reset() { *m = Plan_FinalPlanEvent{} } +func (m *Plan_FinalPlanEvent) String() string { return proto.CompactTextString(m) } +func (*Plan_FinalPlanEvent) ProtoMessage() {} +func (*Plan_FinalPlanEvent) Descriptor() ([]byte, []int) { + return fileDescriptor_f2d875fbd4c0191c, []int{1, 5} +} + +func (m *Plan_FinalPlanEvent) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Plan_FinalPlanEvent.Unmarshal(m, b) +} +func (m *Plan_FinalPlanEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Plan_FinalPlanEvent.Marshal(b, m, deterministic) +} +func (m *Plan_FinalPlanEvent) XXX_Merge(src proto.Message) { + xxx_messageInfo_Plan_FinalPlanEvent.Merge(m, src) +} +func (m *Plan_FinalPlanEvent) XXX_Size() int { + return xxx_messageInfo_Plan_FinalPlanEvent.Size(m) +} +func (m *Plan_FinalPlanEvent) XXX_DiscardUnknown() { + xxx_messageInfo_Plan_FinalPlanEvent.DiscardUnknown(m) +} + +var xxx_messageInfo_Plan_FinalPlanEvent proto.InternalMessageInfo + +func (m *Plan_FinalPlanEvent) GetPlan() []byte { + if m != nil { + return m.Plan + } + return nil +} + +type Apply struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Apply) Reset() { *m = Apply{} } +func (m *Apply) String() string { return proto.CompactTextString(m) } +func (*Apply) ProtoMessage() {} +func (*Apply) Descriptor() ([]byte, []int) { + return fileDescriptor_f2d875fbd4c0191c, []int{2} +} + +func (m *Apply) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Apply.Unmarshal(m, b) +} +func (m *Apply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Apply.Marshal(b, m, deterministic) +} +func (m *Apply) XXX_Merge(src proto.Message) { + xxx_messageInfo_Apply.Merge(m, src) +} +func (m *Apply) XXX_Size() int { + return xxx_messageInfo_Apply.Size(m) +} +func (m *Apply) XXX_DiscardUnknown() { + xxx_messageInfo_Apply.DiscardUnknown(m) +} + +var xxx_messageInfo_Apply proto.InternalMessageInfo + +type Apply_Request struct { + Dependencies *Dependencies `protobuf:"bytes,1,opt,name=dependencies,proto3" json:"dependencies,omitempty"` + // TODO: Should we just import the existing protobuf plan messages + // into here and use them directly? That would turn them into a + // compatibility constraint, but it seems unlikely that we could + // define any better a representation of plan that wouldn't also + // be a compatibility constraint. Perhaps we could abate this concern + // by changing the plan format to be more flexible/extensible. + Plan []byte `protobuf:"bytes,2,opt,name=plan,proto3" json:"plan,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Apply_Request) Reset() { *m = Apply_Request{} } +func (m *Apply_Request) String() string { return proto.CompactTextString(m) } +func (*Apply_Request) ProtoMessage() {} +func (*Apply_Request) Descriptor() ([]byte, []int) { + return fileDescriptor_f2d875fbd4c0191c, []int{2, 0} +} + +func (m *Apply_Request) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Apply_Request.Unmarshal(m, b) +} +func (m *Apply_Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Apply_Request.Marshal(b, m, deterministic) +} +func (m *Apply_Request) XXX_Merge(src proto.Message) { + xxx_messageInfo_Apply_Request.Merge(m, src) +} +func (m *Apply_Request) XXX_Size() int { + return xxx_messageInfo_Apply_Request.Size(m) +} +func (m *Apply_Request) XXX_DiscardUnknown() { + xxx_messageInfo_Apply_Request.DiscardUnknown(m) +} + +var xxx_messageInfo_Apply_Request proto.InternalMessageInfo + +func (m *Apply_Request) GetDependencies() *Dependencies { + if m != nil { + return m.Dependencies + } + return nil +} + +func (m *Apply_Request) GetPlan() []byte { + if m != nil { + return m.Plan + } + return nil +} + +type Apply_ResponseItem struct { + // Types that are valid to be assigned to Event: + // *Apply_ResponseItem_Progress + // *Apply_ResponseItem_BeginResourceInstanceAction + // *Apply_ResponseItem_EndResourceInstanceAction + // *Apply_ResponseItem_StateSnapshot + // *Apply_ResponseItem_Diagnostic + Event isApply_ResponseItem_Event `protobuf_oneof:"event"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Apply_ResponseItem) Reset() { *m = Apply_ResponseItem{} } +func (m *Apply_ResponseItem) String() string { return proto.CompactTextString(m) } +func (*Apply_ResponseItem) ProtoMessage() {} +func (*Apply_ResponseItem) Descriptor() ([]byte, []int) { + return fileDescriptor_f2d875fbd4c0191c, []int{2, 1} +} + +func (m *Apply_ResponseItem) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Apply_ResponseItem.Unmarshal(m, b) +} +func (m *Apply_ResponseItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Apply_ResponseItem.Marshal(b, m, deterministic) +} +func (m *Apply_ResponseItem) XXX_Merge(src proto.Message) { + xxx_messageInfo_Apply_ResponseItem.Merge(m, src) +} +func (m *Apply_ResponseItem) XXX_Size() int { + return xxx_messageInfo_Apply_ResponseItem.Size(m) +} +func (m *Apply_ResponseItem) XXX_DiscardUnknown() { + xxx_messageInfo_Apply_ResponseItem.DiscardUnknown(m) +} + +var xxx_messageInfo_Apply_ResponseItem proto.InternalMessageInfo + +type isApply_ResponseItem_Event interface { + isApply_ResponseItem_Event() +} + +type Apply_ResponseItem_Progress struct { + Progress *Apply_OverallProgressEvent `protobuf:"bytes,1,opt,name=progress,proto3,oneof"` +} + +type Apply_ResponseItem_BeginResourceInstanceAction struct { + BeginResourceInstanceAction *Apply_BeginResourceInstanceActionEvent `protobuf:"bytes,2,opt,name=begin_resource_instance_action,json=beginResourceInstanceAction,proto3,oneof"` +} + +type Apply_ResponseItem_EndResourceInstanceAction struct { + EndResourceInstanceAction *Apply_EndResourceInstanceActionEvent `protobuf:"bytes,3,opt,name=end_resource_instance_action,json=endResourceInstanceAction,proto3,oneof"` +} + +type Apply_ResponseItem_StateSnapshot struct { + StateSnapshot *Apply_StateSnapshotEvent `protobuf:"bytes,4,opt,name=state_snapshot,json=stateSnapshot,proto3,oneof"` +} + +type Apply_ResponseItem_Diagnostic struct { + Diagnostic *Diagnostic `protobuf:"bytes,2048,opt,name=diagnostic,proto3,oneof"` +} + +func (*Apply_ResponseItem_Progress) isApply_ResponseItem_Event() {} + +func (*Apply_ResponseItem_BeginResourceInstanceAction) isApply_ResponseItem_Event() {} + +func (*Apply_ResponseItem_EndResourceInstanceAction) isApply_ResponseItem_Event() {} + +func (*Apply_ResponseItem_StateSnapshot) isApply_ResponseItem_Event() {} + +func (*Apply_ResponseItem_Diagnostic) isApply_ResponseItem_Event() {} + +func (m *Apply_ResponseItem) GetEvent() isApply_ResponseItem_Event { + if m != nil { + return m.Event + } + return nil +} + +func (m *Apply_ResponseItem) GetProgress() *Apply_OverallProgressEvent { + if x, ok := m.GetEvent().(*Apply_ResponseItem_Progress); ok { + return x.Progress + } + return nil +} + +func (m *Apply_ResponseItem) GetBeginResourceInstanceAction() *Apply_BeginResourceInstanceActionEvent { + if x, ok := m.GetEvent().(*Apply_ResponseItem_BeginResourceInstanceAction); ok { + return x.BeginResourceInstanceAction + } + return nil +} + +func (m *Apply_ResponseItem) GetEndResourceInstanceAction() *Apply_EndResourceInstanceActionEvent { + if x, ok := m.GetEvent().(*Apply_ResponseItem_EndResourceInstanceAction); ok { + return x.EndResourceInstanceAction + } + return nil +} + +func (m *Apply_ResponseItem) GetStateSnapshot() *Apply_StateSnapshotEvent { + if x, ok := m.GetEvent().(*Apply_ResponseItem_StateSnapshot); ok { + return x.StateSnapshot + } + return nil +} + +func (m *Apply_ResponseItem) GetDiagnostic() *Diagnostic { + if x, ok := m.GetEvent().(*Apply_ResponseItem_Diagnostic); ok { + return x.Diagnostic + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*Apply_ResponseItem) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*Apply_ResponseItem_Progress)(nil), + (*Apply_ResponseItem_BeginResourceInstanceAction)(nil), + (*Apply_ResponseItem_EndResourceInstanceAction)(nil), + (*Apply_ResponseItem_StateSnapshot)(nil), + (*Apply_ResponseItem_Diagnostic)(nil), + } +} + +type Apply_OverallProgressEvent struct { + // percent_complete is an estimate of how much of the plan operation + // has completed, from 0 to 100 inclusive. Frontends could use this + // to show an indicative progress bar. Until an OverallProgressEvent + // is received a frontend should use an indefinite progress indicator + // to indicate that work is ongoing. + PercentComplete int32 `protobuf:"varint,1,opt,name=percent_complete,json=percentComplete,proto3" json:"percent_complete,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Apply_OverallProgressEvent) Reset() { *m = Apply_OverallProgressEvent{} } +func (m *Apply_OverallProgressEvent) String() string { return proto.CompactTextString(m) } +func (*Apply_OverallProgressEvent) ProtoMessage() {} +func (*Apply_OverallProgressEvent) Descriptor() ([]byte, []int) { + return fileDescriptor_f2d875fbd4c0191c, []int{2, 2} +} + +func (m *Apply_OverallProgressEvent) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Apply_OverallProgressEvent.Unmarshal(m, b) +} +func (m *Apply_OverallProgressEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Apply_OverallProgressEvent.Marshal(b, m, deterministic) +} +func (m *Apply_OverallProgressEvent) XXX_Merge(src proto.Message) { + xxx_messageInfo_Apply_OverallProgressEvent.Merge(m, src) +} +func (m *Apply_OverallProgressEvent) XXX_Size() int { + return xxx_messageInfo_Apply_OverallProgressEvent.Size(m) +} +func (m *Apply_OverallProgressEvent) XXX_DiscardUnknown() { + xxx_messageInfo_Apply_OverallProgressEvent.DiscardUnknown(m) +} + +var xxx_messageInfo_Apply_OverallProgressEvent proto.InternalMessageInfo + +func (m *Apply_OverallProgressEvent) GetPercentComplete() int32 { + if m != nil { + return m.PercentComplete + } + return 0 +} + +type Apply_BeginResourceInstanceActionEvent struct { + ResourceInstance *ResourceInstanceAddr `protobuf:"bytes,1,opt,name=resource_instance,json=resourceInstance,proto3" json:"resource_instance,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Apply_BeginResourceInstanceActionEvent) Reset() { + *m = Apply_BeginResourceInstanceActionEvent{} +} +func (m *Apply_BeginResourceInstanceActionEvent) String() string { return proto.CompactTextString(m) } +func (*Apply_BeginResourceInstanceActionEvent) ProtoMessage() {} +func (*Apply_BeginResourceInstanceActionEvent) Descriptor() ([]byte, []int) { + return fileDescriptor_f2d875fbd4c0191c, []int{2, 3} +} + +func (m *Apply_BeginResourceInstanceActionEvent) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Apply_BeginResourceInstanceActionEvent.Unmarshal(m, b) +} +func (m *Apply_BeginResourceInstanceActionEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Apply_BeginResourceInstanceActionEvent.Marshal(b, m, deterministic) +} +func (m *Apply_BeginResourceInstanceActionEvent) XXX_Merge(src proto.Message) { + xxx_messageInfo_Apply_BeginResourceInstanceActionEvent.Merge(m, src) +} +func (m *Apply_BeginResourceInstanceActionEvent) XXX_Size() int { + return xxx_messageInfo_Apply_BeginResourceInstanceActionEvent.Size(m) +} +func (m *Apply_BeginResourceInstanceActionEvent) XXX_DiscardUnknown() { + xxx_messageInfo_Apply_BeginResourceInstanceActionEvent.DiscardUnknown(m) +} + +var xxx_messageInfo_Apply_BeginResourceInstanceActionEvent proto.InternalMessageInfo + +func (m *Apply_BeginResourceInstanceActionEvent) GetResourceInstance() *ResourceInstanceAddr { + if m != nil { + return m.ResourceInstance + } + return nil +} + +type Apply_EndResourceInstanceActionEvent struct { + ResourceInstance *ResourceInstanceAddr `protobuf:"bytes,1,opt,name=resource_instance,json=resourceInstance,proto3" json:"resource_instance,omitempty"` + // failed is set to true if this action was unsuccessful. Such an + // event is likely to be closely followed by one or more + // DiagnosticEvent messages describing the failure; this flag is + // present to allow a frontend to show explicitly which + // resource instance(s) failed, alongside the error messages. + Failed bool `protobuf:"varint,2048,opt,name=failed,proto3" json:"failed,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Apply_EndResourceInstanceActionEvent) Reset() { *m = Apply_EndResourceInstanceActionEvent{} } +func (m *Apply_EndResourceInstanceActionEvent) String() string { return proto.CompactTextString(m) } +func (*Apply_EndResourceInstanceActionEvent) ProtoMessage() {} +func (*Apply_EndResourceInstanceActionEvent) Descriptor() ([]byte, []int) { + return fileDescriptor_f2d875fbd4c0191c, []int{2, 4} +} + +func (m *Apply_EndResourceInstanceActionEvent) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Apply_EndResourceInstanceActionEvent.Unmarshal(m, b) +} +func (m *Apply_EndResourceInstanceActionEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Apply_EndResourceInstanceActionEvent.Marshal(b, m, deterministic) +} +func (m *Apply_EndResourceInstanceActionEvent) XXX_Merge(src proto.Message) { + xxx_messageInfo_Apply_EndResourceInstanceActionEvent.Merge(m, src) +} +func (m *Apply_EndResourceInstanceActionEvent) XXX_Size() int { + return xxx_messageInfo_Apply_EndResourceInstanceActionEvent.Size(m) +} +func (m *Apply_EndResourceInstanceActionEvent) XXX_DiscardUnknown() { + xxx_messageInfo_Apply_EndResourceInstanceActionEvent.DiscardUnknown(m) +} + +var xxx_messageInfo_Apply_EndResourceInstanceActionEvent proto.InternalMessageInfo + +func (m *Apply_EndResourceInstanceActionEvent) GetResourceInstance() *ResourceInstanceAddr { + if m != nil { + return m.ResourceInstance + } + return nil +} + +func (m *Apply_EndResourceInstanceActionEvent) GetFailed() bool { + if m != nil { + return m.Failed + } + return false +} + +type Apply_StateSnapshotEvent struct { + // Terraform Core delivers updated snapshots of the state as it works. + // It is guaranteed to produce at least one new snapshot after all + // of the changes are complete, but it might emit this event during + // an operation to report a partially-updated state too. Callers + // should save the most recent state snapshot they received after + // an apply operation completes, even if the operation fails. Callers + // may also choose to save intermediate state snapshots, but that is + // not mandatory; if the caller does save them, they may be saved + // in a less persistent way. + State []byte `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Apply_StateSnapshotEvent) Reset() { *m = Apply_StateSnapshotEvent{} } +func (m *Apply_StateSnapshotEvent) String() string { return proto.CompactTextString(m) } +func (*Apply_StateSnapshotEvent) ProtoMessage() {} +func (*Apply_StateSnapshotEvent) Descriptor() ([]byte, []int) { + return fileDescriptor_f2d875fbd4c0191c, []int{2, 5} +} + +func (m *Apply_StateSnapshotEvent) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Apply_StateSnapshotEvent.Unmarshal(m, b) +} +func (m *Apply_StateSnapshotEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Apply_StateSnapshotEvent.Marshal(b, m, deterministic) +} +func (m *Apply_StateSnapshotEvent) XXX_Merge(src proto.Message) { + xxx_messageInfo_Apply_StateSnapshotEvent.Merge(m, src) +} +func (m *Apply_StateSnapshotEvent) XXX_Size() int { + return xxx_messageInfo_Apply_StateSnapshotEvent.Size(m) +} +func (m *Apply_StateSnapshotEvent) XXX_DiscardUnknown() { + xxx_messageInfo_Apply_StateSnapshotEvent.DiscardUnknown(m) +} + +var xxx_messageInfo_Apply_StateSnapshotEvent proto.InternalMessageInfo + +func (m *Apply_StateSnapshotEvent) GetState() []byte { + if m != nil { + return m.State + } + return nil +} + +type EvalExpr struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *EvalExpr) Reset() { *m = EvalExpr{} } +func (m *EvalExpr) String() string { return proto.CompactTextString(m) } +func (*EvalExpr) ProtoMessage() {} +func (*EvalExpr) Descriptor() ([]byte, []int) { + return fileDescriptor_f2d875fbd4c0191c, []int{3} +} + +func (m *EvalExpr) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_EvalExpr.Unmarshal(m, b) +} +func (m *EvalExpr) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_EvalExpr.Marshal(b, m, deterministic) +} +func (m *EvalExpr) XXX_Merge(src proto.Message) { + xxx_messageInfo_EvalExpr.Merge(m, src) +} +func (m *EvalExpr) XXX_Size() int { + return xxx_messageInfo_EvalExpr.Size(m) +} +func (m *EvalExpr) XXX_DiscardUnknown() { + xxx_messageInfo_EvalExpr.DiscardUnknown(m) +} + +var xxx_messageInfo_EvalExpr proto.InternalMessageInfo + +type EvalExpr_Request struct { + Dependencies *Dependencies `protobuf:"bytes,1,opt,name=dependencies,proto3" json:"dependencies,omitempty"` + Expression string `protobuf:"bytes,2,opt,name=expression,proto3" json:"expression,omitempty"` + ModuleInstance string `protobuf:"bytes,3,opt,name=module_instance,json=moduleInstance,proto3" json:"module_instance,omitempty"` + PriorState []byte `protobuf:"bytes,4,opt,name=prior_state,json=priorState,proto3" json:"prior_state,omitempty"` + VariableValues map[string]*DynamicValue `protobuf:"bytes,5,rep,name=variable_values,json=variableValues,proto3" json:"variable_values,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *EvalExpr_Request) Reset() { *m = EvalExpr_Request{} } +func (m *EvalExpr_Request) String() string { return proto.CompactTextString(m) } +func (*EvalExpr_Request) ProtoMessage() {} +func (*EvalExpr_Request) Descriptor() ([]byte, []int) { + return fileDescriptor_f2d875fbd4c0191c, []int{3, 0} +} + +func (m *EvalExpr_Request) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_EvalExpr_Request.Unmarshal(m, b) +} +func (m *EvalExpr_Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_EvalExpr_Request.Marshal(b, m, deterministic) +} +func (m *EvalExpr_Request) XXX_Merge(src proto.Message) { + xxx_messageInfo_EvalExpr_Request.Merge(m, src) +} +func (m *EvalExpr_Request) XXX_Size() int { + return xxx_messageInfo_EvalExpr_Request.Size(m) +} +func (m *EvalExpr_Request) XXX_DiscardUnknown() { + xxx_messageInfo_EvalExpr_Request.DiscardUnknown(m) +} + +var xxx_messageInfo_EvalExpr_Request proto.InternalMessageInfo + +func (m *EvalExpr_Request) GetDependencies() *Dependencies { + if m != nil { + return m.Dependencies + } + return nil +} + +func (m *EvalExpr_Request) GetExpression() string { + if m != nil { + return m.Expression + } + return "" +} + +func (m *EvalExpr_Request) GetModuleInstance() string { + if m != nil { + return m.ModuleInstance + } + return "" +} + +func (m *EvalExpr_Request) GetPriorState() []byte { + if m != nil { + return m.PriorState + } + return nil +} + +func (m *EvalExpr_Request) GetVariableValues() map[string]*DynamicValue { + if m != nil { + return m.VariableValues + } + return nil +} + +type EvalExpr_Response struct { + Diagnostics []*Diagnostic `protobuf:"bytes,2048,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"` + Result *DynamicValue `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *EvalExpr_Response) Reset() { *m = EvalExpr_Response{} } +func (m *EvalExpr_Response) String() string { return proto.CompactTextString(m) } +func (*EvalExpr_Response) ProtoMessage() {} +func (*EvalExpr_Response) Descriptor() ([]byte, []int) { + return fileDescriptor_f2d875fbd4c0191c, []int{3, 1} +} + +func (m *EvalExpr_Response) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_EvalExpr_Response.Unmarshal(m, b) +} +func (m *EvalExpr_Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_EvalExpr_Response.Marshal(b, m, deterministic) +} +func (m *EvalExpr_Response) XXX_Merge(src proto.Message) { + xxx_messageInfo_EvalExpr_Response.Merge(m, src) +} +func (m *EvalExpr_Response) XXX_Size() int { + return xxx_messageInfo_EvalExpr_Response.Size(m) +} +func (m *EvalExpr_Response) XXX_DiscardUnknown() { + xxx_messageInfo_EvalExpr_Response.DiscardUnknown(m) +} + +var xxx_messageInfo_EvalExpr_Response proto.InternalMessageInfo + +func (m *EvalExpr_Response) GetDiagnostics() []*Diagnostic { + if m != nil { + return m.Diagnostics + } + return nil +} + +func (m *EvalExpr_Response) GetResult() *DynamicValue { + if m != nil { + return m.Result + } + return nil +} + +type Dependencies struct { + // modules is a map from module addresses (like "foo.bar") to local + // filesystem paths to the directory containing each module. + // + // The root module is the one whose key is an empty string. + Modules map[string]string `protobuf:"bytes,1,rep,name=modules,proto3" json:"modules,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // providers is a map from provider fully-qualified names in the + // conventional string format (like "registry.terraform.io/hashicorp/dns") + // to executable files suitable for the current platform that Terraform Core + // should launch as plugins for each provider needed in this configuration. + ProviderPlugins map[string]string `protobuf:"bytes,2,rep,name=provider_plugins,json=providerPlugins,proto3" json:"provider_plugins,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Dependencies) Reset() { *m = Dependencies{} } +func (m *Dependencies) String() string { return proto.CompactTextString(m) } +func (*Dependencies) ProtoMessage() {} +func (*Dependencies) Descriptor() ([]byte, []int) { + return fileDescriptor_f2d875fbd4c0191c, []int{4} +} + +func (m *Dependencies) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Dependencies.Unmarshal(m, b) +} +func (m *Dependencies) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Dependencies.Marshal(b, m, deterministic) +} +func (m *Dependencies) XXX_Merge(src proto.Message) { + xxx_messageInfo_Dependencies.Merge(m, src) +} +func (m *Dependencies) XXX_Size() int { + return xxx_messageInfo_Dependencies.Size(m) +} +func (m *Dependencies) XXX_DiscardUnknown() { + xxx_messageInfo_Dependencies.DiscardUnknown(m) +} + +var xxx_messageInfo_Dependencies proto.InternalMessageInfo + +func (m *Dependencies) GetModules() map[string]string { + if m != nil { + return m.Modules + } + return nil +} + +func (m *Dependencies) GetProviderPlugins() map[string]string { + if m != nil { + return m.ProviderPlugins + } + return nil +} + +type ModuleInstanceStep struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Types that are valid to be assigned to InstanceKey: + // *ModuleInstanceStep_String_ + // *ModuleInstanceStep_Int + InstanceKey isModuleInstanceStep_InstanceKey `protobuf_oneof:"instance_key"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ModuleInstanceStep) Reset() { *m = ModuleInstanceStep{} } +func (m *ModuleInstanceStep) String() string { return proto.CompactTextString(m) } +func (*ModuleInstanceStep) ProtoMessage() {} +func (*ModuleInstanceStep) Descriptor() ([]byte, []int) { + return fileDescriptor_f2d875fbd4c0191c, []int{5} +} + +func (m *ModuleInstanceStep) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ModuleInstanceStep.Unmarshal(m, b) +} +func (m *ModuleInstanceStep) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ModuleInstanceStep.Marshal(b, m, deterministic) +} +func (m *ModuleInstanceStep) XXX_Merge(src proto.Message) { + xxx_messageInfo_ModuleInstanceStep.Merge(m, src) +} +func (m *ModuleInstanceStep) XXX_Size() int { + return xxx_messageInfo_ModuleInstanceStep.Size(m) +} +func (m *ModuleInstanceStep) XXX_DiscardUnknown() { + xxx_messageInfo_ModuleInstanceStep.DiscardUnknown(m) +} + +var xxx_messageInfo_ModuleInstanceStep proto.InternalMessageInfo + +func (m *ModuleInstanceStep) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +type isModuleInstanceStep_InstanceKey interface { + isModuleInstanceStep_InstanceKey() +} + +type ModuleInstanceStep_String_ struct { + String_ string `protobuf:"bytes,2,opt,name=string,proto3,oneof"` +} + +type ModuleInstanceStep_Int struct { + Int int64 `protobuf:"varint,3,opt,name=int,proto3,oneof"` +} + +func (*ModuleInstanceStep_String_) isModuleInstanceStep_InstanceKey() {} + +func (*ModuleInstanceStep_Int) isModuleInstanceStep_InstanceKey() {} + +func (m *ModuleInstanceStep) GetInstanceKey() isModuleInstanceStep_InstanceKey { + if m != nil { + return m.InstanceKey + } + return nil +} + +func (m *ModuleInstanceStep) GetString_() string { + if x, ok := m.GetInstanceKey().(*ModuleInstanceStep_String_); ok { + return x.String_ + } + return "" +} + +func (m *ModuleInstanceStep) GetInt() int64 { + if x, ok := m.GetInstanceKey().(*ModuleInstanceStep_Int); ok { + return x.Int + } + return 0 +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*ModuleInstanceStep) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*ModuleInstanceStep_String_)(nil), + (*ModuleInstanceStep_Int)(nil), + } +} + +type ResourceInstanceAddr struct { + ModuleInstance []*ModuleInstanceStep `protobuf:"bytes,1,rep,name=module_instance,json=moduleInstance,proto3" json:"module_instance,omitempty"` + Mode ResourceInstanceAddr_Mode `protobuf:"varint,2,opt,name=mode,proto3,enum=tfcore1.ResourceInstanceAddr_Mode" json:"mode,omitempty"` + TypeName string `protobuf:"bytes,3,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"` + Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ResourceInstanceAddr) Reset() { *m = ResourceInstanceAddr{} } +func (m *ResourceInstanceAddr) String() string { return proto.CompactTextString(m) } +func (*ResourceInstanceAddr) ProtoMessage() {} +func (*ResourceInstanceAddr) Descriptor() ([]byte, []int) { + return fileDescriptor_f2d875fbd4c0191c, []int{6} +} + +func (m *ResourceInstanceAddr) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ResourceInstanceAddr.Unmarshal(m, b) +} +func (m *ResourceInstanceAddr) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ResourceInstanceAddr.Marshal(b, m, deterministic) +} +func (m *ResourceInstanceAddr) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceInstanceAddr.Merge(m, src) +} +func (m *ResourceInstanceAddr) XXX_Size() int { + return xxx_messageInfo_ResourceInstanceAddr.Size(m) +} +func (m *ResourceInstanceAddr) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceInstanceAddr.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceInstanceAddr proto.InternalMessageInfo + +func (m *ResourceInstanceAddr) GetModuleInstance() []*ModuleInstanceStep { + if m != nil { + return m.ModuleInstance + } + return nil +} + +func (m *ResourceInstanceAddr) GetMode() ResourceInstanceAddr_Mode { + if m != nil { + return m.Mode + } + return ResourceInstanceAddr_INVALID +} + +func (m *ResourceInstanceAddr) GetTypeName() string { + if m != nil { + return m.TypeName + } + return "" +} + +func (m *ResourceInstanceAddr) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +// DynamicValue is an opaque encoding of terraform data, with the field name +// indicating the encoding scheme used. +type DynamicValue struct { + Msgpack []byte `protobuf:"bytes,1,opt,name=msgpack,proto3" json:"msgpack,omitempty"` + Json []byte `protobuf:"bytes,2,opt,name=json,proto3" json:"json,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DynamicValue) Reset() { *m = DynamicValue{} } +func (m *DynamicValue) String() string { return proto.CompactTextString(m) } +func (*DynamicValue) ProtoMessage() {} +func (*DynamicValue) Descriptor() ([]byte, []int) { + return fileDescriptor_f2d875fbd4c0191c, []int{7} +} + +func (m *DynamicValue) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DynamicValue.Unmarshal(m, b) +} +func (m *DynamicValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DynamicValue.Marshal(b, m, deterministic) +} +func (m *DynamicValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_DynamicValue.Merge(m, src) +} +func (m *DynamicValue) XXX_Size() int { + return xxx_messageInfo_DynamicValue.Size(m) +} +func (m *DynamicValue) XXX_DiscardUnknown() { + xxx_messageInfo_DynamicValue.DiscardUnknown(m) +} + +var xxx_messageInfo_DynamicValue proto.InternalMessageInfo + +func (m *DynamicValue) GetMsgpack() []byte { + if m != nil { + return m.Msgpack + } + return nil +} + +func (m *DynamicValue) GetJson() []byte { + if m != nil { + return m.Json + } + return nil +} + +type Diagnostic struct { + Severity Diagnostic_Severity `protobuf:"varint,1,opt,name=severity,proto3,enum=tfcore1.Diagnostic_Severity" json:"severity,omitempty"` + Summary string `protobuf:"bytes,2,opt,name=summary,proto3" json:"summary,omitempty"` + Detail string `protobuf:"bytes,3,opt,name=detail,proto3" json:"detail,omitempty"` + // Subject and context both describe portions of a specific source file + // that this diagnostic relates to. "subject" describes the problematic + // element itself, while "context" might describe the bounds of a + // containing construct that is relevant to what the diagnostic is + // describing. + // + // Both source ranges may be absent, if a diagnostic message is not + // related to a particular source element. "context" may be absent, + // in which case its value is implied to be the same as "subject". + Subject *SourceRange `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"` + Context *SourceRange `protobuf:"bytes,5,opt,name=context,proto3" json:"context,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Diagnostic) Reset() { *m = Diagnostic{} } +func (m *Diagnostic) String() string { return proto.CompactTextString(m) } +func (*Diagnostic) ProtoMessage() {} +func (*Diagnostic) Descriptor() ([]byte, []int) { + return fileDescriptor_f2d875fbd4c0191c, []int{8} +} + +func (m *Diagnostic) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Diagnostic.Unmarshal(m, b) +} +func (m *Diagnostic) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Diagnostic.Marshal(b, m, deterministic) +} +func (m *Diagnostic) XXX_Merge(src proto.Message) { + xxx_messageInfo_Diagnostic.Merge(m, src) +} +func (m *Diagnostic) XXX_Size() int { + return xxx_messageInfo_Diagnostic.Size(m) +} +func (m *Diagnostic) XXX_DiscardUnknown() { + xxx_messageInfo_Diagnostic.DiscardUnknown(m) +} + +var xxx_messageInfo_Diagnostic proto.InternalMessageInfo + +func (m *Diagnostic) GetSeverity() Diagnostic_Severity { + if m != nil { + return m.Severity + } + return Diagnostic_INVALID +} + +func (m *Diagnostic) GetSummary() string { + if m != nil { + return m.Summary + } + return "" +} + +func (m *Diagnostic) GetDetail() string { + if m != nil { + return m.Detail + } + return "" +} + +func (m *Diagnostic) GetSubject() *SourceRange { + if m != nil { + return m.Subject + } + return nil +} + +func (m *Diagnostic) GetContext() *SourceRange { + if m != nil { + return m.Context + } + return nil +} + +type SourceRange struct { + // base_module is the address of the module (from the dependencies of the + // related request) that the filename property is relative to. + // + // (This indirection allows for the fact that the path known by the + // frontend might not match the path used by the backend, e.g. if an + // operation is being run remotely.) + BaseModule string `protobuf:"bytes,1,opt,name=base_module,json=baseModule,proto3" json:"base_module,omitempty"` + // filename is a filesystem path relative to the directory of the module + // given in base_module referring to the file that the start end end + // positions relate to. + Filename string `protobuf:"bytes,2,opt,name=filename,proto3" json:"filename,omitempty"` + // start and end describe the characters within the indicated file that + // this range delimits. "start" is enclusive, while "end" is exclusive. + Start *SourcePos `protobuf:"bytes,3,opt,name=start,proto3" json:"start,omitempty"` + End *SourcePos `protobuf:"bytes,4,opt,name=end,proto3" json:"end,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SourceRange) Reset() { *m = SourceRange{} } +func (m *SourceRange) String() string { return proto.CompactTextString(m) } +func (*SourceRange) ProtoMessage() {} +func (*SourceRange) Descriptor() ([]byte, []int) { + return fileDescriptor_f2d875fbd4c0191c, []int{9} +} + +func (m *SourceRange) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SourceRange.Unmarshal(m, b) +} +func (m *SourceRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SourceRange.Marshal(b, m, deterministic) +} +func (m *SourceRange) XXX_Merge(src proto.Message) { + xxx_messageInfo_SourceRange.Merge(m, src) +} +func (m *SourceRange) XXX_Size() int { + return xxx_messageInfo_SourceRange.Size(m) +} +func (m *SourceRange) XXX_DiscardUnknown() { + xxx_messageInfo_SourceRange.DiscardUnknown(m) +} + +var xxx_messageInfo_SourceRange proto.InternalMessageInfo + +func (m *SourceRange) GetBaseModule() string { + if m != nil { + return m.BaseModule + } + return "" +} + +func (m *SourceRange) GetFilename() string { + if m != nil { + return m.Filename + } + return "" +} + +func (m *SourceRange) GetStart() *SourcePos { + if m != nil { + return m.Start + } + return nil +} + +func (m *SourceRange) GetEnd() *SourcePos { + if m != nil { + return m.End + } + return nil +} + +type SourcePos struct { + // line and column describe this position in a text-editor-oriented way. + // Both line and column are 1-based, and column counts Unicode grapheme + // clusters within a line. + Line string `protobuf:"bytes,1,opt,name=line,proto3" json:"line,omitempty"` + Column string `protobuf:"bytes,2,opt,name=column,proto3" json:"column,omitempty"` + // byte is a byte offset that corresponds to the same position given by + // the line and column, for consumers that see the source file as an + // opaque byte slice. + Byte string `protobuf:"bytes,3,opt,name=byte,proto3" json:"byte,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SourcePos) Reset() { *m = SourcePos{} } +func (m *SourcePos) String() string { return proto.CompactTextString(m) } +func (*SourcePos) ProtoMessage() {} +func (*SourcePos) Descriptor() ([]byte, []int) { + return fileDescriptor_f2d875fbd4c0191c, []int{10} +} + +func (m *SourcePos) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SourcePos.Unmarshal(m, b) +} +func (m *SourcePos) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SourcePos.Marshal(b, m, deterministic) +} +func (m *SourcePos) XXX_Merge(src proto.Message) { + xxx_messageInfo_SourcePos.Merge(m, src) +} +func (m *SourcePos) XXX_Size() int { + return xxx_messageInfo_SourcePos.Size(m) +} +func (m *SourcePos) XXX_DiscardUnknown() { + xxx_messageInfo_SourcePos.DiscardUnknown(m) +} + +var xxx_messageInfo_SourcePos proto.InternalMessageInfo + +func (m *SourcePos) GetLine() string { + if m != nil { + return m.Line + } + return "" +} + +func (m *SourcePos) GetColumn() string { + if m != nil { + return m.Column + } + return "" +} + +func (m *SourcePos) GetByte() string { + if m != nil { + return m.Byte + } + return "" +} + +func init() { + proto.RegisterEnum("tfcore1.ResourceInstanceAddr_Mode", ResourceInstanceAddr_Mode_name, ResourceInstanceAddr_Mode_value) + proto.RegisterEnum("tfcore1.Diagnostic_Severity", Diagnostic_Severity_name, Diagnostic_Severity_value) + proto.RegisterType((*Validate)(nil), "tfcore1.Validate") + proto.RegisterType((*Validate_Request)(nil), "tfcore1.Validate.Request") + proto.RegisterType((*Validate_Response)(nil), "tfcore1.Validate.Response") + proto.RegisterType((*Plan)(nil), "tfcore1.Plan") + proto.RegisterType((*Plan_Request)(nil), "tfcore1.Plan.Request") + proto.RegisterMapType((map[string]*DynamicValue)(nil), "tfcore1.Plan.Request.VariableValuesEntry") + proto.RegisterType((*Plan_ResponseItem)(nil), "tfcore1.Plan.ResponseItem") + proto.RegisterType((*Plan_OverallProgressEvent)(nil), "tfcore1.Plan.OverallProgressEvent") + proto.RegisterType((*Plan_BeginResourceInstancePlanEvent)(nil), "tfcore1.Plan.BeginResourceInstancePlanEvent") + proto.RegisterType((*Plan_EndResourceInstancePlanEvent)(nil), "tfcore1.Plan.EndResourceInstancePlanEvent") + proto.RegisterType((*Plan_FinalPlanEvent)(nil), "tfcore1.Plan.FinalPlanEvent") + proto.RegisterType((*Apply)(nil), "tfcore1.Apply") + proto.RegisterType((*Apply_Request)(nil), "tfcore1.Apply.Request") + proto.RegisterType((*Apply_ResponseItem)(nil), "tfcore1.Apply.ResponseItem") + proto.RegisterType((*Apply_OverallProgressEvent)(nil), "tfcore1.Apply.OverallProgressEvent") + proto.RegisterType((*Apply_BeginResourceInstanceActionEvent)(nil), "tfcore1.Apply.BeginResourceInstanceActionEvent") + proto.RegisterType((*Apply_EndResourceInstanceActionEvent)(nil), "tfcore1.Apply.EndResourceInstanceActionEvent") + proto.RegisterType((*Apply_StateSnapshotEvent)(nil), "tfcore1.Apply.StateSnapshotEvent") + proto.RegisterType((*EvalExpr)(nil), "tfcore1.EvalExpr") + proto.RegisterType((*EvalExpr_Request)(nil), "tfcore1.EvalExpr.Request") + proto.RegisterMapType((map[string]*DynamicValue)(nil), "tfcore1.EvalExpr.Request.VariableValuesEntry") + proto.RegisterType((*EvalExpr_Response)(nil), "tfcore1.EvalExpr.Response") + proto.RegisterType((*Dependencies)(nil), "tfcore1.Dependencies") + proto.RegisterMapType((map[string]string)(nil), "tfcore1.Dependencies.ModulesEntry") + proto.RegisterMapType((map[string]string)(nil), "tfcore1.Dependencies.ProviderPluginsEntry") + proto.RegisterType((*ModuleInstanceStep)(nil), "tfcore1.ModuleInstanceStep") + proto.RegisterType((*ResourceInstanceAddr)(nil), "tfcore1.ResourceInstanceAddr") + proto.RegisterType((*DynamicValue)(nil), "tfcore1.DynamicValue") + proto.RegisterType((*Diagnostic)(nil), "tfcore1.Diagnostic") + proto.RegisterType((*SourceRange)(nil), "tfcore1.SourceRange") + proto.RegisterType((*SourcePos)(nil), "tfcore1.SourcePos") +} + +func init() { proto.RegisterFile("tfcore1.proto", fileDescriptor_f2d875fbd4c0191c) } + +var fileDescriptor_f2d875fbd4c0191c = []byte{ + // 1313 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcf, 0x73, 0xdb, 0xc4, + 0x17, 0x8f, 0xfc, 0x23, 0xb6, 0x5f, 0x5c, 0xc7, 0xdf, 0x6d, 0xda, 0xba, 0x4a, 0xbe, 0x21, 0x88, + 0xce, 0x90, 0x06, 0xea, 0x42, 0x99, 0xe9, 0x94, 0x52, 0x18, 0x1c, 0x62, 0x9a, 0x14, 0x9a, 0x66, + 0x36, 0x25, 0xf4, 0xe6, 0x91, 0xa5, 0x67, 0xa3, 0x56, 0x5e, 0xa9, 0xd2, 0xda, 0x53, 0xdf, 0x98, + 0x61, 0x38, 0x70, 0xe1, 0x52, 0x4e, 0x5c, 0xb9, 0x70, 0xe0, 0x0f, 0xe1, 0xcf, 0xe8, 0xbf, 0xc0, + 0x7f, 0xc0, 0xec, 0x6a, 0x25, 0x4b, 0xb6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, 0x64, 0x84, 0xfa, + 0x13, 0xb8, 0x98, 0x03, 0x23, 0x4d, 0x28, 0x3e, 0xc3, 0xa9, 0xf4, 0xbe, 0x46, 0xc5, 0x27, 0x79, + 0x0f, 0xca, 0x92, 0x53, 0xfa, 0x95, 0x39, 0xd1, 0x94, 0x99, 0x23, 0xc7, 0x92, 0xda, 0x34, 0xc2, + 0xdc, 0x2d, 0xdc, 0xd1, 0xf4, 0x3f, 0x8a, 0x50, 0x8f, 0x63, 0x7c, 0xc0, 0x71, 0x44, 0x3e, 0x87, + 0xaa, 0x1f, 0x78, 0xc3, 0x00, 0xc3, 0x38, 0x2c, 0x46, 0xd6, 0xef, 0x47, 0x13, 0x0c, 0x4c, 0xd7, + 0x3d, 0x52, 0xa0, 0xee, 0x04, 0x19, 0xdf, 0x5f, 0xa2, 0x89, 0x16, 0xf1, 0x60, 0xa3, 0x8f, 0x43, + 0x87, 0xf5, 0x02, 0x0c, 0xbd, 0x71, 0x60, 0x61, 0xcf, 0x61, 0x21, 0x37, 0x99, 0x85, 0x3d, 0xdf, + 0x35, 0x99, 0x72, 0xed, 0xfd, 0xac, 0xd5, 0x5d, 0xa1, 0x41, 0x95, 0xc2, 0x81, 0xc2, 0x8b, 0x9d, + 0xd8, 0xfe, 0xd5, 0xfe, 0x69, 0x08, 0xe2, 0x80, 0x8e, 0xcc, 0x3e, 0x8d, 0xae, 0x28, 0xe9, 0x76, + 0xb2, 0x74, 0x5d, 0x66, 0x9f, 0x45, 0x76, 0x05, 0xf3, 0xf7, 0xc9, 0xa7, 0x00, 0x03, 0x87, 0x99, + 0x6e, 0x64, 0xba, 0x29, 0x4d, 0x6f, 0x64, 0x4d, 0x7f, 0x29, 0xf6, 0xd3, 0xc6, 0x6a, 0x83, 0x58, + 0x42, 0x6e, 0x03, 0xcc, 0x6a, 0x53, 0xd4, 0xb0, 0x76, 0x4a, 0x0d, 0xef, 0x2f, 0xd1, 0x14, 0x72, + 0xb7, 0x02, 0x65, 0x14, 0xd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0xc3, + 0x89, 0x6d, 0xe3, 0x2b, 0xa8, 0x25, 0x12, 0x91, 0x49, 0xd7, 0x61, 0x49, 0xe7, 0x88, 0x6f, 0x11, + 0x66, 0xcb, 0x73, 0xc7, 0xa3, 0xf8, 0x51, 0x50, 0x2b, 0x81, 0xed, 0x4f, 0x79, 0x5c, 0x77, 0xf2, + 0xfb, 0xd6, 0xcf, 0x05, 0xa8, 0x3d, 0xc6, 0x20, 0x30, 0x07, 0x5e, 0x20, 0xe7, 0xb8, 0xf8, 0xd7, + 0x2f, 0xb9, 0x9a, 0xf0, 0xc7, 0xa2, 0xf8, 0x6e, 0xd7, 0xf5, 0xbc, 0x2d, 0x75, 0xdb, 0x7e, 0x12, + 0xfd, 0x52, 0x25, 0x97, 0x72, 0x7f, 0x28, 0xa6, 0x54, 0x95, 0x78, 0x36, 0x45, 0x7e, 0xa0, 0x91, + 0xcf, 0xd4, 0xec, 0x4a, 0x2e, 0xcf, 0xcd, 0x42, 0xb1, 0xfa, 0xfa, 0x82, 0x3c, 0xa3, 0xdf, 0x99, + 0xbd, 0xb2, 0x29, 0xff, 0xe7, 0xdf, 0xa6, 0x94, 0x13, 0xa9, 0xad, 0xc8, 0x50, 0x7f, 0x59, 0xfe, + 0x23, 0xf0, 0xd1, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x5e, 0x80, 0x55, 0xed, 0x22, 0x10, 0x00, + 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// TerraformClient is the client API for Terraform service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type TerraformClient interface { + // Validate tests whether the configuration is semantically valid using + // only static checks that can be decided without accessing any external + // API endpoints. + Validate(ctx context.Context, in *Validate_Request, opts ...grpc.CallOption) (*Validate_Response, error) + // Plan reads the latest upstream values corresponding to objects in the + // given prior state snapshot and compares the result with the given + // configuration in order to produce a planned set of actions that would + // cause the remote objects to match the desired values given in the + // configuration. + Plan(ctx context.Context, in *Plan_Request, opts ...grpc.CallOption) (Terraform_PlanClient, error) + // Apply takes a plan previously produced by Plan (from the same version of + // Terraform Core) and runs all of the planned actions against real + // remote APIs. + Apply(ctx context.Context, in *Apply_Request, opts ...grpc.CallOption) (Terraform_ApplyClient, error) + // EvalExpr takes a state snapshot and an expression in Terraform language + // syntax and evaluates the expression against the given state. + EvalExpr(ctx context.Context, in *EvalExpr_Request, opts ...grpc.CallOption) (*EvalExpr_Response, error) +} + +type terraformClient struct { + cc *grpc.ClientConn +} + +func NewTerraformClient(cc *grpc.ClientConn) TerraformClient { + return &terraformClient{cc} +} + +func (c *terraformClient) Validate(ctx context.Context, in *Validate_Request, opts ...grpc.CallOption) (*Validate_Response, error) { + out := new(Validate_Response) + err := c.cc.Invoke(ctx, "/tfcore1.Terraform/Validate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *terraformClient) Plan(ctx context.Context, in *Plan_Request, opts ...grpc.CallOption) (Terraform_PlanClient, error) { + stream, err := c.cc.NewStream(ctx, &_Terraform_serviceDesc.Streams[0], "/tfcore1.Terraform/Plan", opts...) + if err != nil { + return nil, err + } + x := &terraformPlanClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type Terraform_PlanClient interface { + Recv() (*Plan_ResponseItem, error) + grpc.ClientStream +} + +type terraformPlanClient struct { + grpc.ClientStream +} + +func (x *terraformPlanClient) Recv() (*Plan_ResponseItem, error) { + m := new(Plan_ResponseItem) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *terraformClient) Apply(ctx context.Context, in *Apply_Request, opts ...grpc.CallOption) (Terraform_ApplyClient, error) { + stream, err := c.cc.NewStream(ctx, &_Terraform_serviceDesc.Streams[1], "/tfcore1.Terraform/Apply", opts...) + if err != nil { + return nil, err + } + x := &terraformApplyClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type Terraform_ApplyClient interface { + Recv() (*Apply_ResponseItem, error) + grpc.ClientStream +} + +type terraformApplyClient struct { + grpc.ClientStream +} + +func (x *terraformApplyClient) Recv() (*Apply_ResponseItem, error) { + m := new(Apply_ResponseItem) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *terraformClient) EvalExpr(ctx context.Context, in *EvalExpr_Request, opts ...grpc.CallOption) (*EvalExpr_Response, error) { + out := new(EvalExpr_Response) + err := c.cc.Invoke(ctx, "/tfcore1.Terraform/EvalExpr", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// TerraformServer is the server API for Terraform service. +type TerraformServer interface { + // Validate tests whether the configuration is semantically valid using + // only static checks that can be decided without accessing any external + // API endpoints. + Validate(context.Context, *Validate_Request) (*Validate_Response, error) + // Plan reads the latest upstream values corresponding to objects in the + // given prior state snapshot and compares the result with the given + // configuration in order to produce a planned set of actions that would + // cause the remote objects to match the desired values given in the + // configuration. + Plan(*Plan_Request, Terraform_PlanServer) error + // Apply takes a plan previously produced by Plan (from the same version of + // Terraform Core) and runs all of the planned actions against real + // remote APIs. + Apply(*Apply_Request, Terraform_ApplyServer) error + // EvalExpr takes a state snapshot and an expression in Terraform language + // syntax and evaluates the expression against the given state. + EvalExpr(context.Context, *EvalExpr_Request) (*EvalExpr_Response, error) +} + +// UnimplementedTerraformServer can be embedded to have forward compatible implementations. +type UnimplementedTerraformServer struct { +} + +func (*UnimplementedTerraformServer) Validate(ctx context.Context, req *Validate_Request) (*Validate_Response, error) { + return nil, status.Errorf(codes.Unimplemented, "method Validate not implemented") +} +func (*UnimplementedTerraformServer) Plan(req *Plan_Request, srv Terraform_PlanServer) error { + return status.Errorf(codes.Unimplemented, "method Plan not implemented") +} +func (*UnimplementedTerraformServer) Apply(req *Apply_Request, srv Terraform_ApplyServer) error { + return status.Errorf(codes.Unimplemented, "method Apply not implemented") +} +func (*UnimplementedTerraformServer) EvalExpr(ctx context.Context, req *EvalExpr_Request) (*EvalExpr_Response, error) { + return nil, status.Errorf(codes.Unimplemented, "method EvalExpr not implemented") +} + +func RegisterTerraformServer(s *grpc.Server, srv TerraformServer) { + s.RegisterService(&_Terraform_serviceDesc, srv) +} + +func _Terraform_Validate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Validate_Request) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TerraformServer).Validate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tfcore1.Terraform/Validate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TerraformServer).Validate(ctx, req.(*Validate_Request)) + } + return interceptor(ctx, in, info, handler) +} + +func _Terraform_Plan_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(Plan_Request) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(TerraformServer).Plan(m, &terraformPlanServer{stream}) +} + +type Terraform_PlanServer interface { + Send(*Plan_ResponseItem) error + grpc.ServerStream +} + +type terraformPlanServer struct { + grpc.ServerStream +} + +func (x *terraformPlanServer) Send(m *Plan_ResponseItem) error { + return x.ServerStream.SendMsg(m) +} + +func _Terraform_Apply_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(Apply_Request) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(TerraformServer).Apply(m, &terraformApplyServer{stream}) +} + +type Terraform_ApplyServer interface { + Send(*Apply_ResponseItem) error + grpc.ServerStream +} + +type terraformApplyServer struct { + grpc.ServerStream +} + +func (x *terraformApplyServer) Send(m *Apply_ResponseItem) error { + return x.ServerStream.SendMsg(m) +} + +func _Terraform_EvalExpr_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EvalExpr_Request) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TerraformServer).EvalExpr(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tfcore1.Terraform/EvalExpr", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TerraformServer).EvalExpr(ctx, req.(*EvalExpr_Request)) + } + return interceptor(ctx, in, info, handler) +} + +var _Terraform_serviceDesc = grpc.ServiceDesc{ + ServiceName: "tfcore1.Terraform", + HandlerType: (*TerraformServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Validate", + Handler: _Terraform_Validate_Handler, + }, + { + MethodName: "EvalExpr", + Handler: _Terraform_EvalExpr_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "Plan", + Handler: _Terraform_Plan_Handler, + ServerStreams: true, + }, + { + StreamName: "Apply", + Handler: _Terraform_Apply_Handler, + ServerStreams: true, + }, + }, + Metadata: "tfcore1.proto", +} diff --git a/internal/tfcore1/tfcore1.proto b/internal/tfcore1/tfcore1.proto new file mode 100644 index 0000000000..024e46e96a --- /dev/null +++ b/internal/tfcore1/tfcore1.proto @@ -0,0 +1,295 @@ +// Prototype protocol for hypothetical Terraform Core as a distinct component +// from Terraform CLI. +syntax = "proto3"; + +package tfcore1; + +service Terraform { + // TODO: Do we need to provide a way for Terraform Core to inspect the + // configuration and report what it depends on (modules and providers)? + // Hopefully having the clients embed terraform-config-inspect is good + // enough. + + // Validate tests whether the configuration is semantically valid using + // only static checks that can be decided without accessing any external + // API endpoints. + rpc Validate(Validate.Request) returns (Validate.Response); + + // Plan reads the latest upstream values corresponding to objects in the + // given prior state snapshot and compares the result with the given + // configuration in order to produce a planned set of actions that would + // cause the remote objects to match the desired values given in the + // configuration. + rpc Plan(Plan.Request) returns (stream Plan.ResponseItem); + + // Apply takes a plan previously produced by Plan (from the same version of + // Terraform Core) and runs all of the planned actions against real + // remote APIs. + rpc Apply(Apply.Request) returns (stream Apply.ResponseItem); + + // EvalExpr takes a state snapshot and an expression in Terraform language + // syntax and evaluates the expression against the given state. + rpc EvalExpr(EvalExpr.Request) returns (EvalExpr.Response); +} + +message Validate { + message Request { + Dependencies dependencies = 1; + } + message Response { + repeated Diagnostic diagnostics = 2048; + + // TODO: Maybe we also include some shallow configuration description + // in here, to the level of detail used by terraform-config-inspect? + // But we'll see if we can solve this by having the frontends depend + // on terraform-config-inspect themselves, first. + } +} + +message Plan { + message Request { + Dependencies dependencies = 1; + bytes prior_state = 2; + map variable_values = 3; + } + message ResponseItem { + oneof event { + // Indices 1 through 15 are reserved for event types that always + // appear several times during the course of a Plan operation, + // because these have the most compact field number wire encoding. + + OverallProgressEvent progress = 1; + BeginResourceInstancePlanEvent begin_resource_instance_plan = 2; + EndResourceInstancePlanEvent end_resource_instance_plan = 3; + + // Indices 16 through 2047 are for event types that we expect to + // see in a normal, successful Plan operation but that are expected + // to appear only a few times. + + FinalPlanEvent final_plan = 16; + + // Indices 2048 through 18999 are for event types that appear only + // in exceptional circumstances; these have the longest field + // number wire encoding. + + Diagnostic diagnostic = 2048; + + // Do not use indices greater than 18999. + } + // No other fields can be added outside of the oneof, because the + // absense of any recognized field indicates an unsupported event + // type that the client might warn the user about. + } + message OverallProgressEvent { + // percent_complete is an estimate of how much of the plan operation + // has completed, from 0 to 100 inclusive. Frontends could use this + // to show an indicative progress bar. Until an OverallProgressEvent + // is received a frontend should use an indefinite progress indicator + // to indicate that work is ongoing. + int32 percent_complete = 1; + } + message BeginResourceInstancePlanEvent { + ResourceInstanceAddr resource_instance = 1; + } + message EndResourceInstancePlanEvent { + ResourceInstanceAddr resource_instance = 1; + // failed is set to true if the planning for this instance was + // unsuccessful. Such an event is likely to be closely followed by + // one or more DiagnosticEvent messages describing the failure; + // this flag is present to allow a frontend to show explicitly which + // resource instance(s) failed, alongside the error messages. + bool failed = 2048; + } + message FinalPlanEvent { + // TODO: What format shall we use to communicate the plan to the + // client? + bytes plan = 1; + } +} + +message Apply { + message Request { + Dependencies dependencies = 1; + // TODO: Should we just import the existing protobuf plan messages + // into here and use them directly? That would turn them into a + // compatibility constraint, but it seems unlikely that we could + // define any better a representation of plan that wouldn't also + // be a compatibility constraint. Perhaps we could abate this concern + // by changing the plan format to be more flexible/extensible. + bytes plan = 2; + } + message ResponseItem { + oneof event { + // Indices 1 through 15 are reserved for event types that always + // appear several times during the course of a Apply operation, + // because these have the most compact field number wire encoding. + + OverallProgressEvent progress = 1; + BeginResourceInstanceActionEvent begin_resource_instance_action = 2; + EndResourceInstanceActionEvent end_resource_instance_action = 3; + StateSnapshotEvent state_snapshot = 4; + + // Indices 16 through 2047 are for event types that we expect to + // see in a normal, successful Plan operation but that are expected + // to appear only a few times. + + // Indices 2048 through 18999 are for event types that appear only + // in exceptional circumstances; these have the longest field + // number wire encoding. + + Diagnostic diagnostic = 2048; + + // Do not use indices greater than 18999. + } + } + message OverallProgressEvent { + // percent_complete is an estimate of how much of the plan operation + // has completed, from 0 to 100 inclusive. Frontends could use this + // to show an indicative progress bar. Until an OverallProgressEvent + // is received a frontend should use an indefinite progress indicator + // to indicate that work is ongoing. + int32 percent_complete = 1; + } + message BeginResourceInstanceActionEvent { + ResourceInstanceAddr resource_instance = 1; + // TODO: A representation of the action. If we bring in the protobuf + // definition for the plan file format in here then we'll get an enum + // for that. + } + message EndResourceInstanceActionEvent { + ResourceInstanceAddr resource_instance = 1; + // TODO: A representation of the action. If we bring in the protobuf + // definition for the plan file format in here then we'll get an enum + // for that. + + // failed is set to true if this action was unsuccessful. Such an + // event is likely to be closely followed by one or more + // DiagnosticEvent messages describing the failure; this flag is + // present to allow a frontend to show explicitly which + // resource instance(s) failed, alongside the error messages. + bool failed = 2048; + } + message StateSnapshotEvent { + // Terraform Core delivers updated snapshots of the state as it works. + // It is guaranteed to produce at least one new snapshot after all + // of the changes are complete, but it might emit this event during + // an operation to report a partially-updated state too. Callers + // should save the most recent state snapshot they received after + // an apply operation completes, even if the operation fails. Callers + // may also choose to save intermediate state snapshots, but that is + // not mandatory; if the caller does save them, they may be saved + // in a less persistent way. + bytes state = 1; + } +} + +message EvalExpr { + message Request { + Dependencies dependencies = 1; + string expression = 2; + string module_instance = 3; + bytes prior_state = 4; + map variable_values = 5; + } + message Response { + repeated Diagnostic diagnostics = 2048; + DynamicValue result = 2; + } +} + +message Dependencies { + // modules is a map from module addresses (like "foo.bar") to local + // filesystem paths to the directory containing each module. + // + // The root module is the one whose key is an empty string. + map modules = 1; + + // providers is a map from provider fully-qualified names in the + // conventional string format (like "registry.terraform.io/hashicorp/dns") + // to executable files suitable for the current platform that Terraform Core + // should launch as plugins for each provider needed in this configuration. + map provider_plugins = 2; +} + +message ModuleInstanceStep { + string name = 1; + oneof instance_key { + string string = 2; + int64 int = 3; + } +} + +message ResourceInstanceAddr { + enum Mode { + INVALID = 0; + MANAGED = 1; + DATA = 2; + } + repeated ModuleInstanceStep module_instance = 1; + Mode mode = 2; + string type_name = 3; + string name = 4; +} + +// DynamicValue is an opaque encoding of terraform data, with the field name +// indicating the encoding scheme used. +message DynamicValue { + bytes msgpack = 1; + bytes json = 2; +} + +message Diagnostic { + enum Severity { + INVALID = 0; + ERROR = 1; + WARNING = 2; + } + Severity severity = 1; + string summary = 2; + string detail = 3; + + // Subject and context both describe portions of a specific source file + // that this diagnostic relates to. "subject" describes the problematic + // element itself, while "context" might describe the bounds of a + // containing construct that is relevant to what the diagnostic is + // describing. + // + // Both source ranges may be absent, if a diagnostic message is not + // related to a particular source element. "context" may be absent, + // in which case its value is implied to be the same as "subject". + SourceRange subject = 4; + SourceRange context = 5; +} + +message SourceRange { + // base_module is the address of the module (from the dependencies of the + // related request) that the filename property is relative to. + // + // (This indirection allows for the fact that the path known by the + // frontend might not match the path used by the backend, e.g. if an + // operation is being run remotely.) + string base_module = 1; + + // filename is a filesystem path relative to the directory of the module + // given in base_module referring to the file that the start end end + // positions relate to. + string filename = 2; + + // start and end describe the characters within the indicated file that + // this range delimits. "start" is enclusive, while "end" is exclusive. + SourcePos start = 3; + SourcePos end = 4; +} + +message SourcePos { + // line and column describe this position in a text-editor-oriented way. + // Both line and column are 1-based, and column counts Unicode grapheme + // clusters within a line. + string line = 1; + string column = 2; + + // byte is a byte offset that corresponds to the same position given by + // the line and column, for consumers that see the source file as an + // opaque byte slice. + string byte = 3; +}