planproto

package
v0.15.0-beta1 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2021 License: MPL-2.0 Imports: 5 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",
	}
	Action_value = map[string]int32{
		"NOOP":               0,
		"CREATE":             1,
		"READ":               2,
		"UPDATE":             3,
		"DELETE":             5,
		"DELETE_THEN_CREATE": 6,
		"CREATE_THEN_DELETE": 7,
	}
)

Enum value maps for Action.

View Source
var (
	ResourceInstanceChange_ResourceMode_name = map[int32]string{
		0: "managed",
		1: "data",
	}
	ResourceInstanceChange_ResourceMode_value = map[string]int32{
		"managed": 0,
		"data":    1,
	}
)

Enum value maps for ResourceInstanceChange_ResourceMode.

View Source
var File_planfile_proto protoreflect.FileDescriptor

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) Descriptor added in v0.15.0

func (Action) Descriptor() protoreflect.EnumDescriptor

func (Action) Enum added in v0.15.0

func (x Action) Enum() *Action

func (Action) EnumDescriptor deprecated

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

Deprecated: Use Action.Descriptor instead.

func (Action) Number added in v0.15.0

func (x Action) Number() protoreflect.EnumNumber

func (Action) String

func (x Action) String() string

func (Action) Type added in v0.15.0

func (Action) Type() protoreflect.EnumType

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"`
	// contains filtered or unexported fields
}

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

func (*Backend) Descriptor deprecated

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

Deprecated: Use Backend.ProtoReflect.Descriptor instead.

func (*Backend) GetConfig

func (x *Backend) GetConfig() *DynamicValue

func (*Backend) GetType

func (x *Backend) GetType() string

func (*Backend) GetWorkspace

func (x *Backend) GetWorkspace() string

func (*Backend) ProtoMessage

func (*Backend) ProtoMessage()

func (*Backend) ProtoReflect added in v0.15.0

func (x *Backend) ProtoReflect() protoreflect.Message

func (*Backend) Reset

func (x *Backend) Reset()

func (*Backend) String

func (x *Backend) String() string

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"`
	// contains filtered or unexported fields
}

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

func (*Change) Descriptor deprecated

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

Deprecated: Use Change.ProtoReflect.Descriptor instead.

func (*Change) GetAction

func (x *Change) GetAction() Action

func (*Change) GetValues

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

func (*Change) ProtoMessage

func (*Change) ProtoMessage()

func (*Change) ProtoReflect added in v0.15.0

func (x *Change) ProtoReflect() protoreflect.Message

func (*Change) Reset

func (x *Change) Reset()

func (*Change) String

func (x *Change) String() string

type DynamicValue

type DynamicValue struct {
	Msgpack []byte `protobuf:"bytes,1,opt,name=msgpack,proto3" json:"msgpack,omitempty"`
	// contains filtered or unexported fields
}

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 deprecated

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

Deprecated: Use DynamicValue.ProtoReflect.Descriptor instead.

func (*DynamicValue) GetMsgpack

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

func (*DynamicValue) ProtoMessage

func (*DynamicValue) ProtoMessage()

func (*DynamicValue) ProtoReflect added in v0.15.0

func (x *DynamicValue) ProtoReflect() protoreflect.Message

func (*DynamicValue) Reset

func (x *DynamicValue) Reset()

func (*DynamicValue) String

func (x *DynamicValue) String() string

type Hash

type Hash struct {
	Sha256 []byte `protobuf:"bytes,1,opt,name=sha256,proto3" json:"sha256,omitempty"`
	// contains filtered or unexported fields
}

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 deprecated

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

Deprecated: Use Hash.ProtoReflect.Descriptor instead.

func (*Hash) GetSha256

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

func (*Hash) ProtoMessage

func (*Hash) ProtoMessage()

func (*Hash) ProtoReflect added in v0.15.0

func (x *Hash) ProtoReflect() protoreflect.Message

func (*Hash) Reset

func (x *Hash) Reset()

func (*Hash) String

func (x *Hash) String() string

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"`
	// contains filtered or unexported fields
}

func (*OutputChange) Descriptor deprecated

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

Deprecated: Use OutputChange.ProtoReflect.Descriptor instead.

func (*OutputChange) GetChange

func (x *OutputChange) GetChange() *Change

func (*OutputChange) GetName

func (x *OutputChange) GetName() string

func (*OutputChange) GetSensitive

func (x *OutputChange) GetSensitive() bool

func (*OutputChange) ProtoMessage

func (*OutputChange) ProtoMessage()

func (*OutputChange) ProtoReflect added in v0.15.0

func (x *OutputChange) ProtoReflect() protoreflect.Message

func (*OutputChange) Reset

func (x *OutputChange) Reset()

func (*OutputChange) String

func (x *OutputChange) String() string

type Path

type Path struct {
	Steps []*Path_Step `protobuf:"bytes,1,rep,name=steps,proto3" json:"steps,omitempty"`
	// contains filtered or unexported fields
}

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 deprecated

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

Deprecated: Use Path.ProtoReflect.Descriptor instead.

func (*Path) GetSteps

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

func (*Path) ProtoMessage

func (*Path) ProtoMessage()

func (*Path) ProtoReflect added in v0.15.0

func (x *Path) ProtoReflect() protoreflect.Message

func (*Path) Reset

func (x *Path) Reset()

func (*Path) String

func (x *Path) String() string

type Path_Step

type Path_Step struct {

	// Types that are assignable to Selector:
	//	*Path_Step_AttributeName
	//	*Path_Step_ElementKey
	Selector isPath_Step_Selector `protobuf_oneof:"selector"`
	// contains filtered or unexported fields
}

func (*Path_Step) Descriptor deprecated

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

Deprecated: Use Path_Step.ProtoReflect.Descriptor instead.

func (*Path_Step) GetAttributeName

func (x *Path_Step) GetAttributeName() string

func (*Path_Step) GetElementKey

func (x *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) ProtoReflect added in v0.15.0

func (x *Path_Step) ProtoReflect() protoreflect.Message

func (*Path_Step) Reset

func (x *Path_Step) Reset()

func (*Path_Step) String

func (x *Path_Step) String() string

type Path_Step_AttributeName

type Path_Step_AttributeName struct {
	// Set "attribute_name" to represent looking up an attribute
	// in the current object value.
	AttributeName string `protobuf:"bytes,1,opt,name=attribute_name,json=attributeName,proto3,oneof"`
}

type Path_Step_ElementKey

type Path_Step_ElementKey struct {
	// Set "element_key" to represent looking up an element in
	// an indexable collection type.
	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"`
	// contains filtered or unexported fields
}

Plan is the root message type for the tfplan file

func (*Plan) Descriptor deprecated

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

Deprecated: Use Plan.ProtoReflect.Descriptor instead.

func (*Plan) GetBackend

func (x *Plan) GetBackend() *Backend

func (*Plan) GetOutputChanges

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

func (*Plan) GetProviderHashes

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

func (*Plan) GetResourceChanges

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

func (*Plan) GetTargetAddrs

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

func (*Plan) GetTerraformVersion

func (x *Plan) GetTerraformVersion() string

func (*Plan) GetVariables

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

func (*Plan) GetVersion

func (x *Plan) GetVersion() uint64

func (*Plan) ProtoMessage

func (*Plan) ProtoMessage()

func (*Plan) ProtoReflect added in v0.15.0

func (x *Plan) ProtoReflect() protoreflect.Message

func (*Plan) Reset

func (x *Plan) Reset()

func (*Plan) String

func (x *Plan) String() string

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 assignable 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"`
	// contains filtered or unexported fields
}

func (*ResourceInstanceChange) Descriptor deprecated

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

Deprecated: Use ResourceInstanceChange.ProtoReflect.Descriptor instead.

func (*ResourceInstanceChange) GetChange

func (x *ResourceInstanceChange) GetChange() *Change

func (*ResourceInstanceChange) GetDeposedKey

func (x *ResourceInstanceChange) GetDeposedKey() string

func (*ResourceInstanceChange) GetInstanceKey

func (m *ResourceInstanceChange) GetInstanceKey() isResourceInstanceChange_InstanceKey

func (*ResourceInstanceChange) GetInt

func (x *ResourceInstanceChange) GetInt() int64

func (*ResourceInstanceChange) GetMode

func (*ResourceInstanceChange) GetModulePath

func (x *ResourceInstanceChange) GetModulePath() string

func (*ResourceInstanceChange) GetName

func (x *ResourceInstanceChange) GetName() string

func (*ResourceInstanceChange) GetPrivate

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

func (*ResourceInstanceChange) GetProvider

func (x *ResourceInstanceChange) GetProvider() string

func (*ResourceInstanceChange) GetRequiredReplace

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

func (*ResourceInstanceChange) GetStr

func (x *ResourceInstanceChange) GetStr() string

func (*ResourceInstanceChange) GetType

func (x *ResourceInstanceChange) GetType() string

func (*ResourceInstanceChange) ProtoMessage

func (*ResourceInstanceChange) ProtoMessage()

func (*ResourceInstanceChange) ProtoReflect added in v0.15.0

func (x *ResourceInstanceChange) ProtoReflect() protoreflect.Message

func (*ResourceInstanceChange) Reset

func (x *ResourceInstanceChange) Reset()

func (*ResourceInstanceChange) String

func (x *ResourceInstanceChange) String() string

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 // for "resource" blocks in configuration
	ResourceInstanceChange_data    ResourceInstanceChange_ResourceMode = 1 // for "data" blocks in configuration
)

func (ResourceInstanceChange_ResourceMode) Descriptor added in v0.15.0

func (ResourceInstanceChange_ResourceMode) Enum added in v0.15.0

func (ResourceInstanceChange_ResourceMode) EnumDescriptor deprecated

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

Deprecated: Use ResourceInstanceChange_ResourceMode.Descriptor instead.

func (ResourceInstanceChange_ResourceMode) Number added in v0.15.0

func (ResourceInstanceChange_ResourceMode) String

func (ResourceInstanceChange_ResourceMode) Type added in v0.15.0

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