remote

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2016 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_PATH_TO_LOCAL_STATE_FILE = "terraform.tfstate"

When storing Terraform state locally, this is the default path to the tfstate file

View Source
const DEFAULT_PATH_TO_REMOTE_STATE_FILE = ".terraform/terraform.tfstate"

When using remote state storage, Terraform keeps a local copy of the state file in this folder

Variables

View Source
var RemoteBackendMissing = fmt.Errorf("The remoteState.backend field cannot be empty")

Functions

This section is empty.

Types

type CantParseTerraformStateFile

type CantParseTerraformStateFile struct {
	Path          string
	UnderlyingErr error
}

func (CantParseTerraformStateFile) Error

func (err CantParseTerraformStateFile) Error() string

type RemoteState

type RemoteState struct {
	Backend string            `hcl:"backend"`
	Config  map[string]string `hcl:"config"`
}

Configuration for Terraform remote state

func (RemoteState) ConfigureRemoteState

func (remoteState RemoteState) ConfigureRemoteState() error

Configure Terraform remote state

func (*RemoteState) FillDefaults

func (remoteState *RemoteState) FillDefaults()

Fill in any default configuration for remote state

func (*RemoteState) Validate

func (remoteState *RemoteState) Validate() error

Validate that the remote state is configured correctly

type TerraformState

type TerraformState struct {
	Version int
	Serial  int
	Remote  *TerraformStateRemote
	Modules []TerraformStateModule
}

The structure of the Terraform .tfstate file

func ParseTerraformStateFile

func ParseTerraformStateFile(path string) (*TerraformState, error)

Parse the Terraform .tfstate file at the given path

func ParseTerraformStateFileFromDefaultLocations

func ParseTerraformStateFileFromDefaultLocations() (*TerraformState, error)

Parse the Terraform .tfstate file from its default locations. If the file doesn't exist at any of the default locations, return nil.

func (*TerraformState) IsRemote

func (state *TerraformState) IsRemote() bool

Return true if this Terraform state is configured for remote state storage

type TerraformStateModule

type TerraformStateModule struct {
	Path      []string
	Outputs   map[string]interface{}
	Resources map[string]interface{}
}

The structure of a "module" section of the Terraform .tfstate file

type TerraformStateRemote

type TerraformStateRemote struct {
	Type   string
	Config map[string]interface{}
}

The structure of the "remote" section of the Terraform .tfstate file

Jump to

Keyboard shortcuts

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