terraform

package
v0.0.0-...-82468b1 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2020 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LinkToThirdPartyPluginDir

func LinkToThirdPartyPluginDir(sourceDir string) error

Types

type Action

type Action struct {
	Client    Client
	Model     models.Terraform
	Logger    logger.Logger
	EnvName   string
	SourceDir string
}

func (*Action) Apply

func (a *Action) Apply() (Result, error)

func (*Action) Destroy

func (a *Action) Destroy() (Result, error)

func (*Action) Plan

func (a *Action) Plan() (Result, error)

type Client

type Client interface {
	InitWithBackend() error
	InitWithoutBackend() error
	Apply() error
	Destroy() error
	Plan() (string, error)
	JSONPlan() error
	Output(string) (map[string]map[string]interface{}, error)
	OutputWithLegacyStorage() (map[string]map[string]interface{}, error)
	Version() (string, error)
	Import(string) error
	ImportWithLegacyStorage() error
	WorkspaceList() ([]string, error)
	WorkspaceNewFromExistingStateFile(string, string) error
	WorkspaceNewIfNotExists(string) error
	WorkspaceSelect(string) error
	WorkspaceDelete(string) error
	WorkspaceDeleteWithForce(string) error
	StatePull(string) ([]byte, error)
	CurrentStateVersion(string) (StateVersion, error)
	SavePlanToBackend(string) error
	GetPlanFromBackend(string) error
	SetModel(models.Terraform)
}

func NewClient

func NewClient(model models.Terraform, logWriter io.Writer) Client

type LegacyStorageAction

type LegacyStorageAction struct {
	Client    Client
	Model     models.Terraform
	PlanFile  storage.PlanFile
	StateFile storage.StateFile
	Logger    logger.Logger
}

func (*LegacyStorageAction) Apply

func (*LegacyStorageAction) Destroy

func (*LegacyStorageAction) Plan

type LegacyStorageResult

type LegacyStorageResult struct {
	Version storage.Version
	Output  map[string]map[string]interface{}
}

func (LegacyStorageResult) RawOutput

func (r LegacyStorageResult) RawOutput() map[string]interface{}

func (LegacyStorageResult) SanitizedOutput

func (r LegacyStorageResult) SanitizedOutput() map[string]string

type MigratedFromStorageAction

type MigratedFromStorageAction struct {
	Client    Client
	Model     models.Terraform
	Logger    logger.Logger
	EnvName   string
	StateFile storage.StateFile
}

func (*MigratedFromStorageAction) Apply

func (a *MigratedFromStorageAction) Apply() (Result, error)

func (*MigratedFromStorageAction) Destroy

func (a *MigratedFromStorageAction) Destroy() (Result, error)

func (*MigratedFromStorageAction) Plan

func (a *MigratedFromStorageAction) Plan() (Result, error)

type Result

type Result struct {
	Version models.Version
	Output  map[string]map[string]interface{}
}

func (Result) RawOutput

func (r Result) RawOutput() map[string]interface{}

func (Result) SanitizedOutput

func (r Result) SanitizedOutput() map[string]string

type StateVersion

type StateVersion struct {
	Serial  int
	Lineage string
}

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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