v2

package
v0.0.0-...-162d18c Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2017 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package v2 contains types used to represent Terraform plan version 2.

Types in this package were copied -- mostly mechanically -- from Terraform itself. Specifically they were copied from v0.10.8.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AtlasConfig

type AtlasConfig struct {
	Name    string
	Include []string
	Exclude []string
}

type Backend

type Backend struct {
	Type      string
	RawConfig *RawConfig

	Hash uint64
}

type BackendState

type BackendState struct {
	Type string `json:"type"`

	Hash uint64 `json:"hash"`
}

type Config

type Config struct {
	Dir string

	Terraform       *Terraform
	Atlas           *AtlasConfig
	Modules         []*Module
	ProviderConfigs []*ProviderConfig
	Resources       []*Resource
	Variables       []*Variable
	Locals          []*Local
	Outputs         []*Output
}

type Diff

type Diff struct {
	Modules []*ModuleDiff
}

type DiffAttrType

type DiffAttrType byte
const (
	DiffAttrInput   DiffAttrType = 1
	DiffAttrOutput  DiffAttrType = 2
	DiffAttrUnknown DiffAttrType = 0
)

type EphemeralState

type EphemeralState struct {
	ConnInfo map[string]string `json:"-"`

	Type string `json:"-"`
}

type InstanceDiff

type InstanceDiff struct {
	Attributes     map[string]*ResourceAttrDiff
	Destroy        bool
	DestroyDeposed bool
	DestroyTainted bool
}

type InstanceState

type InstanceState struct {
	ID         string            `json:"id"`
	Attributes map[string]string `json:"attributes"`
	Tainted    bool              `json:"tainted"`
}

type Local

type Local struct {
	Name      string
	RawConfig *RawConfig
}

type Module

type Module struct {
	Name      string
	Source    string
	Version   string
	Providers map[string]string
	RawConfig *RawConfig
}

type ModuleDiff

type ModuleDiff struct {
	Path      []string
	Resources map[string]*InstanceDiff
	Destroy   bool
}

type ModuleState

type ModuleState struct {
	Path         []string                  `json:"path"`
	Outputs      map[string]*OutputState   `json:"outputs"`
	Resources    map[string]*ResourceState `json:"resources"`
	Dependencies []string                  `json:"depends_on"`
}

type Output

type Output struct {
	Name        string
	DependsOn   []string
	Description string
	Sensitive   bool
	RawConfig   *RawConfig
}

type OutputState

type OutputState struct {
	Sensitive bool        `json:"sensitive"`
	Type      string      `json:"type"`
	Value     interface{} `json:"value"`
}

type Plan

type Plan struct {
	Diff   *Diff
	Module *Tree
	State  *State
	//Vars             map[string]interface{}
	Targets          []string
	TerraformVersion string
	ProviderSHA256s  map[string][]byte
	Backend          *BackendState
	Destroy          bool
}

type ProviderConfig

type ProviderConfig struct {
	Name      string
	Alias     string
	Version   string
	RawConfig *RawConfig

	Path []string

	Inherited bool
}

type Provisioner

type Provisioner struct {
	Type      string
	RawConfig *RawConfig
	ConnInfo  *RawConfig

	When      ProvisionerWhen
	OnFailure ProvisionerOnFailure
}

type ProvisionerOnFailure

type ProvisionerOnFailure int
const (
	ProvisionerOnFailureContinue ProvisionerOnFailure = 1
	ProvisionerOnFailureFail     ProvisionerOnFailure = 2
	ProvisionerOnFailureInvalid  ProvisionerOnFailure = 0
)

type ProvisionerWhen

type ProvisionerWhen int
const (
	ProvisionerWhenCreate  ProvisionerWhen = 1
	ProvisionerWhenDestroy ProvisionerWhen = 2
	ProvisionerWhenInvalid ProvisionerWhen = 0
)

type RawConfig

type RawConfig struct {
	Key string
}

func (*RawConfig) GobDecode

func (r *RawConfig) GobDecode(b []byte) error

func (*RawConfig) GobEncode

func (r *RawConfig) GobEncode() ([]byte, error)

type RemoteState

type RemoteState struct {
	Type   string            `json:"type"`
	Config map[string]string `json:"config"`
}

type Resource

type Resource struct {
	Mode         ResourceMode
	Name         string
	Type         string
	RawCount     *RawConfig
	RawConfig    *RawConfig
	Provisioners []*Provisioner
	Provider     string
	DependsOn    []string
	Lifecycle    ResourceLifecycle
}

type ResourceAttrDiff

type ResourceAttrDiff struct {
	Old         string
	New         string
	NewComputed bool
	NewRemoved  bool
	RequiresNew bool
	Sensitive   bool
	Type        DiffAttrType
}

type ResourceLifecycle

type ResourceLifecycle struct {
	CreateBeforeDestroy bool     `mapstructure:"create_before_destroy"`
	PreventDestroy      bool     `mapstructure:"prevent_destroy"`
	IgnoreChanges       []string `mapstructure:"ignore_changes"`
}

type ResourceMode

type ResourceMode int
const (
	DataResourceMode    ResourceMode = 1
	ManagedResourceMode ResourceMode = 0
)

type ResourceState

type ResourceState struct {
	Type         string           `json:"type"`
	Dependencies []string         `json:"depends_on"`
	Primary      *InstanceState   `json:"primary"`
	Deposed      []*InstanceState `json:"deposed"`
	Provider     string           `json:"provider"`
}

type State

type State struct {
	Version   int            `json:"version"`
	TFVersion string         `json:"terraform_version,omitempty"`
	Serial    int64          `json:"serial"`
	Lineage   string         `json:"lineage"`
	Remote    *RemoteState   `json:"remote,omitempty"`
	Backend   *BackendState  `json:"backend,omitempty"`
	Modules   []*ModuleState `json:"modules"`
}

type Terraform

type Terraform struct {
	RequiredVersion string `hcl:"required_version"`
	Backend         *Backend
}

type Tree

type Tree struct {
	// contains filtered or unexported fields
}

func (*Tree) GobDecode

func (t *Tree) GobDecode(bs []byte) error

func (*Tree) GobEncode

func (t *Tree) GobEncode() ([]byte, error)

type Variable

type Variable struct {
	Name         string
	DeclaredType string `mapstructure:"type"`
	Default      interface{}
	Description  string
}

Jump to

Keyboard shortcuts

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