planproto

package
v0.12.0-beta1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2019 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package planproto is home to the Go stubs generated from the tfplan protobuf schema.

This is an internal package to be used only by Terraform's planfile package. From elsewhere in Terraform, use the API exported by the planfile package itself.

Index

Constants

This section is empty.

Variables

View Source
var Action_name = map[int32]string{
	0: "NOOP",
	1: "CREATE",
	2: "READ",
	3: "UPDATE",
	5: "DELETE",
	6: "DELETE_THEN_CREATE",
	7: "CREATE_THEN_DELETE",
}
View Source
var Action_value = map[string]int32{
	"NOOP":               0,
	"CREATE":             1,
	"READ":               2,
	"UPDATE":             3,
	"DELETE":             5,
	"DELETE_THEN_CREATE": 6,
	"CREATE_THEN_DELETE": 7,
}
View Source
var ResourceInstanceChange_ResourceMode_name = map[int32]string{
	0: "managed",
	1: "data",
}
View Source
var ResourceInstanceChange_ResourceMode_value = map[string]int32{
	"managed": 0,
	"data":    1,
}

Functions

This section is empty.

Types

type Action

type Action int32

Action describes the type of action planned for an object. Not all action values are valid for all object types.

const (
	Action_NOOP               Action = 0
	Action_CREATE             Action = 1
	Action_READ               Action = 2
	Action_UPDATE             Action = 3
	Action_DELETE             Action = 5
	Action_DELETE_THEN_CREATE Action = 6
	Action_CREATE_THEN_DELETE Action = 7
)

func (Action) EnumDescriptor

func (Action) EnumDescriptor() ([]byte, []int)

func (Action) String

func (x Action) String() string

type Backend

type Backend struct {
	Type                 string        `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	Config               *DynamicValue `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
	Workspace            string        `protobuf:"bytes,3,opt,name=workspace,proto3" json:"workspace,omitempty"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

Backend is a description of backend configuration and other related settings.

func (*Backend) Descriptor

func (*Backend) Descriptor() ([]byte, []int)

func (*Backend) GetConfig

func (m *Backend) GetConfig() *DynamicValue

func (*Backend) GetType

func (m *Backend) GetType() string

func (*Backend) GetWorkspace

func (m *Backend) GetWorkspace() string

func (*Backend) ProtoMessage

func (*Backend) ProtoMessage()

func (*Backend) Reset

func (m *Backend) Reset()

func (*Backend) String

func (m *Backend) String() string

func (*Backend) XXX_DiscardUnknown

func (m *Backend) XXX_DiscardUnknown()

func (*Backend) XXX_Marshal

func (m *Backend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Backend) XXX_Merge

func (dst *Backend) XXX_Merge(src proto.Message)

func (*Backend) XXX_Size

func (m *Backend) XXX_Size() int

func (*Backend) XXX_Unmarshal

func (m *Backend) XXX_Unmarshal(b []byte) error

type Change

type Change struct {
	// Not all action values are valid for all object types. Consult
	// the documentation for any message that embeds Change.
	Action Action `protobuf:"varint,1,opt,name=action,proto3,enum=tfplan.Action" json:"action,omitempty"`
	// msgpack-encoded HCL values involved in the change.
	// - For update and replace, two values are provided that give the old and new values,
	//   respectively.
	// - For create, one value is provided that gives the new value to be created
	// - For delete, one value is provided that describes the value being deleted
	// - For read, two values are provided that give the prior value for this object
	//   (or null, if no prior value exists) and the value that was or will be read,
	//   respectively.
	// - For no-op, one value is provided that is left unmodified by this non-change.
	Values               []*DynamicValue `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

Change represents a change made to some object, transforming it from an old state to a new state.

func (*Change) Descriptor

func (*Change) Descriptor() ([]byte, []int)

func (*Change) GetAction

func (m *Change) GetAction() Action

func (*Change) GetValues

func (m *Change) GetValues() []*DynamicValue

func (*Change) ProtoMessage

func (*Change) ProtoMessage()

func (*Change) Reset

func (m *Change) Reset()

func (*Change) String

func (m *Change) String() string

func (*Change) XXX_DiscardUnknown

func (m *Change) XXX_DiscardUnknown()

func (*Change) XXX_Marshal

func (m *Change) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Change) XXX_Merge

func (dst *Change) XXX_Merge(src proto.Message)

func (*Change) XXX_Size

func (m *Change) XXX_Size() int

func (*Change) XXX_Unmarshal

func (m *Change) XXX_Unmarshal(b []byte) error

type DynamicValue

type DynamicValue struct {
	Msgpack              []byte   `protobuf:"bytes,1,opt,name=msgpack,proto3" json:"msgpack,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

DynamicValue represents a value whose type is not decided until runtime, often based on schema information obtained from a plugin.

At present dynamic values are always encoded as msgpack, with extension id 0 used to represent the special "unknown" value indicating results that won't be known until after apply.

In future other serialization formats may be used, possibly with a transitional period of including both as separate attributes of this type. Consumers must ignore attributes they don't support and fail if no supported attribute is present. The top-level format version will not be incremented for changes to the set of dynamic serialization formats.

func (*DynamicValue) Descriptor

func (*DynamicValue) Descriptor() ([]byte, []int)

func (*DynamicValue) GetMsgpack

func (m *DynamicValue) GetMsgpack() []byte

func (*DynamicValue) ProtoMessage

func (*DynamicValue) ProtoMessage()

func (*DynamicValue) Reset

func (m *DynamicValue) Reset()

func (*DynamicValue) String

func (m *DynamicValue) String() string

func (*DynamicValue) XXX_DiscardUnknown

func (m *DynamicValue) XXX_DiscardUnknown()

func (*DynamicValue) XXX_Marshal

func (m *DynamicValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DynamicValue) XXX_Merge

func (dst *DynamicValue) XXX_Merge(src proto.Message)

func (*DynamicValue) XXX_Size

func (m *DynamicValue) XXX_Size() int

func (*DynamicValue) XXX_Unmarshal

func (m *DynamicValue) XXX_Unmarshal(b []byte) error

type Hash

type Hash struct {
	Sha256               []byte   `protobuf:"bytes,1,opt,name=sha256,proto3" json:"sha256,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Hash represents a hash value.

At present hashes always use the SHA256 algorithm. In future other hash algorithms may be used, possibly with a transitional period of including both as separate attributes of this type. Consumers must ignore attributes they don't support and fail if no supported attribute is present. The top-level format version will not be incremented for changes to the set of hash algorithms.

func (*Hash) Descriptor

func (*Hash) Descriptor() ([]byte, []int)

func (*Hash) GetSha256

func (m *Hash) GetSha256() []byte

func (*Hash) ProtoMessage

func (*Hash) ProtoMessage()

func (*Hash) Reset

func (m *Hash) Reset()

func (*Hash) String

func (m *Hash) String() string

func (*Hash) XXX_DiscardUnknown

func (m *Hash) XXX_DiscardUnknown()

func (*Hash) XXX_Marshal

func (m *Hash) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Hash) XXX_Merge

func (dst *Hash) XXX_Merge(src proto.Message)

func (*Hash) XXX_Size

func (m *Hash) XXX_Size() int

func (*Hash) XXX_Unmarshal

func (m *Hash) XXX_Unmarshal(b []byte) error

type OutputChange

type OutputChange struct {
	// Name of the output as defined in the root module.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Description of the proposed change. May use "no-op", "create",
	// "update" and "delete" actions.
	Change *Change `protobuf:"bytes,2,opt,name=change,proto3" json:"change,omitempty"`
	// Sensitive, if true, indicates that one or more of the values given
	// in "change" is sensitive and should not be shown directly in any
	// rendered plan.
	Sensitive            bool     `protobuf:"varint,3,opt,name=sensitive,proto3" json:"sensitive,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*OutputChange) Descriptor

func (*OutputChange) Descriptor() ([]byte, []int)

func (*OutputChange) GetChange

func (m *OutputChange) GetChange() *Change

func (*OutputChange) GetName

func (m *OutputChange) GetName() string

func (*OutputChange) GetSensitive

func (m *OutputChange) GetSensitive() bool

func (*OutputChange) ProtoMessage

func (*OutputChange) ProtoMessage()

func (*OutputChange) Reset

func (m *OutputChange) Reset()

func (*OutputChange) String

func (m *OutputChange) String() string

func (*OutputChange) XXX_DiscardUnknown

func (m *OutputChange) XXX_DiscardUnknown()

func (*OutputChange) XXX_Marshal

func (m *OutputChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*OutputChange) XXX_Merge

func (dst *OutputChange) XXX_Merge(src proto.Message)

func (*OutputChange) XXX_Size

func (m *OutputChange) XXX_Size() int

func (*OutputChange) XXX_Unmarshal

func (m *OutputChange) XXX_Unmarshal(b []byte) error

type Path

type Path struct {
	Steps                []*Path_Step `protobuf:"bytes,1,rep,name=steps,proto3" json:"steps,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

Path represents a set of steps to traverse into a data structure. It is used to refer to a sub-structure within a dynamic data structure presented separately.

func (*Path) Descriptor

func (*Path) Descriptor() ([]byte, []int)

func (*Path) GetSteps

func (m *Path) GetSteps() []*Path_Step

func (*Path) ProtoMessage

func (*Path) ProtoMessage()

func (*Path) Reset

func (m *Path) Reset()

func (*Path) String

func (m *Path) String() string

func (*Path) XXX_DiscardUnknown

func (m *Path) XXX_DiscardUnknown()

func (*Path) XXX_Marshal

func (m *Path) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Path) XXX_Merge

func (dst *Path) XXX_Merge(src proto.Message)

func (*Path) XXX_Size

func (m *Path) XXX_Size() int

func (*Path) XXX_Unmarshal

func (m *Path) XXX_Unmarshal(b []byte) error

type Path_Step

type Path_Step struct {
	// Types that are valid to be assigned to Selector:
	//	*Path_Step_AttributeName
	//	*Path_Step_ElementKey
	Selector             isPath_Step_Selector `protobuf_oneof:"selector"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func (*Path_Step) Descriptor

func (*Path_Step) Descriptor() ([]byte, []int)

func (*Path_Step) GetAttributeName

func (m *Path_Step) GetAttributeName() string

func (*Path_Step) GetElementKey

func (m *Path_Step) GetElementKey() *DynamicValue

func (*Path_Step) GetSelector

func (m *Path_Step) GetSelector() isPath_Step_Selector

func (*Path_Step) ProtoMessage

func (*Path_Step) ProtoMessage()

func (*Path_Step) Reset

func (m *Path_Step) Reset()

func (*Path_Step) String

func (m *Path_Step) String() string

func (*Path_Step) XXX_DiscardUnknown

func (m *Path_Step) XXX_DiscardUnknown()

func (*Path_Step) XXX_Marshal

func (m *Path_Step) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Path_Step) XXX_Merge

func (dst *Path_Step) XXX_Merge(src proto.Message)

func (*Path_Step) XXX_OneofFuncs

func (*Path_Step) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*Path_Step) XXX_Size

func (m *Path_Step) XXX_Size() int

func (*Path_Step) XXX_Unmarshal

func (m *Path_Step) XXX_Unmarshal(b []byte) error

type Path_Step_AttributeName

type Path_Step_AttributeName struct {
	AttributeName string `protobuf:"bytes,1,opt,name=attribute_name,json=attributeName,proto3,oneof"`
}

type Path_Step_ElementKey

type Path_Step_ElementKey struct {
	ElementKey *DynamicValue `protobuf:"bytes,2,opt,name=element_key,json=elementKey,proto3,oneof"`
}

type Plan

type Plan struct {
	// Version is incremented whenever there is a breaking change to
	// the serialization format. Programs reading serialized plans should
	// verify that version is set to the expected value and abort processing
	// if not. A breaking change is any change that may cause an older
	// consumer to interpret the structure incorrectly. This number will
	// not be incremented if an existing consumer can either safely ignore
	// changes to the format or if an existing consumer would fail to process
	// the file for another message- or field-specific reason.
	Version uint64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
	// The variables that were set when creating the plan. Each value is
	// a msgpack serialization of an HCL value.
	Variables map[string]*DynamicValue `` /* 159-byte string literal not displayed */
	// An unordered set of proposed changes to resources throughout the
	// configuration, including any nested modules. Use the address of
	// each resource to determine which module it belongs to.
	ResourceChanges []*ResourceInstanceChange `protobuf:"bytes,3,rep,name=resource_changes,json=resourceChanges,proto3" json:"resource_changes,omitempty"`
	// An unordered set of proposed changes to outputs in the root module
	// of the configuration. This set also includes "no action" changes for
	// outputs that are not changing, as context for detecting inconsistencies
	// at apply time.
	OutputChanges []*OutputChange `protobuf:"bytes,4,rep,name=output_changes,json=outputChanges,proto3" json:"output_changes,omitempty"`
	// An unordered set of target addresses to include when applying. If no
	// target addresses are present, the plan applies to the whole
	// configuration.
	TargetAddrs []string `protobuf:"bytes,5,rep,name=target_addrs,json=targetAddrs,proto3" json:"target_addrs,omitempty"`
	// The version string for the Terraform binary that created this plan.
	TerraformVersion string `protobuf:"bytes,14,opt,name=terraform_version,json=terraformVersion,proto3" json:"terraform_version,omitempty"`
	// SHA256 digests of all of the provider plugin binaries that were used
	// in the creation of this plan.
	ProviderHashes map[string]*Hash `` /* 192-byte string literal not displayed */
	// Backend is a description of the backend configuration and other related
	// settings at the time the plan was created.
	Backend              *Backend `protobuf:"bytes,13,opt,name=backend,proto3" json:"backend,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Plan is the root message type for the tfplan file

func (*Plan) Descriptor

func (*Plan) Descriptor() ([]byte, []int)

func (*Plan) GetBackend

func (m *Plan) GetBackend() *Backend

func (*Plan) GetOutputChanges

func (m *Plan) GetOutputChanges() []*OutputChange

func (*Plan) GetProviderHashes

func (m *Plan) GetProviderHashes() map[string]*Hash

func (*Plan) GetResourceChanges

func (m *Plan) GetResourceChanges() []*ResourceInstanceChange

func (*Plan) GetTargetAddrs

func (m *Plan) GetTargetAddrs() []string

func (*Plan) GetTerraformVersion

func (m *Plan) GetTerraformVersion() string

func (*Plan) GetVariables

func (m *Plan) GetVariables() map[string]*DynamicValue

func (*Plan) GetVersion

func (m *Plan) GetVersion() uint64

func (*Plan) ProtoMessage

func (*Plan) ProtoMessage()

func (*Plan) Reset

func (m *Plan) Reset()

func (*Plan) String

func (m *Plan) String() string

func (*Plan) XXX_DiscardUnknown

func (m *Plan) XXX_DiscardUnknown()

func (*Plan) XXX_Marshal

func (m *Plan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Plan) XXX_Merge

func (dst *Plan) XXX_Merge(src proto.Message)

func (*Plan) XXX_Size

func (m *Plan) XXX_Size() int

func (*Plan) XXX_Unmarshal

func (m *Plan) XXX_Unmarshal(b []byte) error

type ResourceInstanceChange

type ResourceInstanceChange struct {
	// module_path is an address to the module that defined this resource.
	// module_path is omitted for resources in the root module. For descendent modules
	// it is a string like module.foo.module.bar as would be seen at the beginning of a
	// resource address. The format of this string is not yet frozen and so external
	// callers should treat it as an opaque key for filtering purposes.
	ModulePath string `protobuf:"bytes,1,opt,name=module_path,json=modulePath,proto3" json:"module_path,omitempty"`
	// mode is the resource mode.
	Mode ResourceInstanceChange_ResourceMode `protobuf:"varint,2,opt,name=mode,proto3,enum=tfplan.ResourceInstanceChange_ResourceMode" json:"mode,omitempty"`
	// type is the resource type name, like "aws_instance".
	Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
	// name is the logical name of the resource as defined in configuration.
	// For example, in aws_instance.foo this would be "foo".
	Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
	// instance_key is either an integer index or a string key, depending on which iteration
	// attributes ("count" or "for_each") are being used for this resource. If none
	// are in use, this field is omitted.
	//
	// Types that are valid to be assigned to InstanceKey:
	//	*ResourceInstanceChange_Str
	//	*ResourceInstanceChange_Int
	InstanceKey isResourceInstanceChange_InstanceKey `protobuf_oneof:"instance_key"`
	// deposed_key, if set, indicates that this change applies to a deposed
	// object for the indicated instance with the given deposed key. If not
	// set, the change applies to the instance's current object.
	DeposedKey string `protobuf:"bytes,7,opt,name=deposed_key,json=deposedKey,proto3" json:"deposed_key,omitempty"`
	// provider is the address of the provider configuration that this change
	// was planned with, and thus the configuration that must be used to
	// apply it.
	Provider string `protobuf:"bytes,8,opt,name=provider,proto3" json:"provider,omitempty"`
	// Description of the proposed change. May use "create", "read", "update",
	// "replace" and "delete" actions. "no-op" changes are not currently used here
	// but consumers must accept and discard them to allow for future expansion.
	Change *Change `protobuf:"bytes,9,opt,name=change,proto3" json:"change,omitempty"`
	// raw blob value provided by the provider as additional context for the
	// change. Must be considered an opaque value for any consumer other than
	// the provider that generated it, and will be returned verbatim to the
	// provider during the subsequent apply operation.
	Private []byte `protobuf:"bytes,10,opt,name=private,proto3" json:"private,omitempty"`
	// An unordered set of paths that prompted the change action to be
	// "replace" rather than "update". Empty for any action other than
	// "replace".
	RequiredReplace      []*Path  `protobuf:"bytes,11,rep,name=required_replace,json=requiredReplace,proto3" json:"required_replace,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ResourceInstanceChange) Descriptor

func (*ResourceInstanceChange) Descriptor() ([]byte, []int)

func (*ResourceInstanceChange) GetChange

func (m *ResourceInstanceChange) GetChange() *Change

func (*ResourceInstanceChange) GetDeposedKey

func (m *ResourceInstanceChange) GetDeposedKey() string

func (*ResourceInstanceChange) GetInstanceKey

func (m *ResourceInstanceChange) GetInstanceKey() isResourceInstanceChange_InstanceKey

func (*ResourceInstanceChange) GetInt

func (m *ResourceInstanceChange) GetInt() int64

func (*ResourceInstanceChange) GetMode

func (*ResourceInstanceChange) GetModulePath

func (m *ResourceInstanceChange) GetModulePath() string

func (*ResourceInstanceChange) GetName

func (m *ResourceInstanceChange) GetName() string

func (*ResourceInstanceChange) GetPrivate

func (m *ResourceInstanceChange) GetPrivate() []byte

func (*ResourceInstanceChange) GetProvider

func (m *ResourceInstanceChange) GetProvider() string

func (*ResourceInstanceChange) GetRequiredReplace

func (m *ResourceInstanceChange) GetRequiredReplace() []*Path

func (*ResourceInstanceChange) GetStr

func (m *ResourceInstanceChange) GetStr() string

func (*ResourceInstanceChange) GetType

func (m *ResourceInstanceChange) GetType() string

func (*ResourceInstanceChange) ProtoMessage

func (*ResourceInstanceChange) ProtoMessage()

func (*ResourceInstanceChange) Reset

func (m *ResourceInstanceChange) Reset()

func (*ResourceInstanceChange) String

func (m *ResourceInstanceChange) String() string

func (*ResourceInstanceChange) XXX_DiscardUnknown

func (m *ResourceInstanceChange) XXX_DiscardUnknown()

func (*ResourceInstanceChange) XXX_Marshal

func (m *ResourceInstanceChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ResourceInstanceChange) XXX_Merge

func (dst *ResourceInstanceChange) XXX_Merge(src proto.Message)

func (*ResourceInstanceChange) XXX_OneofFuncs

func (*ResourceInstanceChange) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*ResourceInstanceChange) XXX_Size

func (m *ResourceInstanceChange) XXX_Size() int

func (*ResourceInstanceChange) XXX_Unmarshal

func (m *ResourceInstanceChange) XXX_Unmarshal(b []byte) error

type ResourceInstanceChange_Int

type ResourceInstanceChange_Int struct {
	Int int64 `protobuf:"varint,6,opt,name=int,proto3,oneof"`
}

type ResourceInstanceChange_ResourceMode

type ResourceInstanceChange_ResourceMode int32
const (
	ResourceInstanceChange_managed ResourceInstanceChange_ResourceMode = 0
	ResourceInstanceChange_data    ResourceInstanceChange_ResourceMode = 1
)

func (ResourceInstanceChange_ResourceMode) EnumDescriptor

func (ResourceInstanceChange_ResourceMode) EnumDescriptor() ([]byte, []int)

func (ResourceInstanceChange_ResourceMode) String

type ResourceInstanceChange_Str

type ResourceInstanceChange_Str struct {
	Str string `protobuf:"bytes,5,opt,name=str,proto3,oneof"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL