terraform

package
v0.15.11 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2021 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StateVersion = 4
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	State State
}

func LoadState

func LoadState(reader io.Reader) (*Data, error)

LoadState loads the given reader into tfstate and validates the state version

type Instance

type Instance struct {
	IndexKey interface{} `json:"index_key,omitempty"`
	Status   string      `json:"status,omitempty"`
	Deposed  string      `json:"deposed,omitempty"`

	SchemaVersion           uint64            `json:"schema_version"`
	AttributesRaw           json.RawMessage   `json:"attributes,omitempty"`
	AttributesFlat          map[string]string `json:"attributes_flat,omitempty"`
	AttributeSensitivePaths json.RawMessage   `json:"sensitive_attributes,omitempty,"`

	PrivateRaw []byte `json:"private,omitempty"`

	Dependencies []string `json:"dependencies,omitempty"`

	CreateBeforeDestroy bool `json:"create_before_destroy,omitempty"`
}

type Mode

type Mode string
const (
	ModeManaged Mode = "managed"
	ModeData    Mode = "data"
)

func (Mode) Valid

func (m Mode) Valid() bool

type OutputState

type OutputState struct {
	ValueRaw     json.RawMessage `json:"value"`
	ValueTypeRaw json.RawMessage `json:"type"`
	Sensitive    bool            `json:"sensitive,omitempty"`
}

type Resource

type Resource struct {
	Module         string     `json:"module,omitempty"`
	Mode           Mode       `json:"mode"`
	Type           string     `json:"type"`
	Name           string     `json:"name"`
	EachMode       string     `json:"each,omitempty"`
	ProviderConfig string     `json:"provider"`
	Instances      []Instance `json:"instances"`
}

type State

type State struct {
	Version          uint64                 `json:"version"`
	TerraformVersion string                 `json:"terraform_version"`
	Serial           uint64                 `json:"serial"`
	Lineage          string                 `json:"lineage"`
	RootOutputs      map[string]OutputState `json:"outputs"`
	Resources        []Resource             `json:"resources"`
}

Jump to

Keyboard shortcuts

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