terraform

package
v0.64.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

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

Container stores information about a running terraform container for running terraform commands in.

func NewContainer

func NewContainer(dockerClient docker.Iface, image, codeDir string, releaseVolume string, logLevel string) (*Container, error)

NewContainer creates and returns a terraformContainer for running terraform commands in.

func (*Container) CheckFileExists added in v0.49.0

func (terraformContainer *Container) CheckFileExists(path string, errorStream io.Writer) (bool, error)

func (*Container) ConfigureBackend

func (terraformContainer *Container) ConfigureBackend(outputStream, errorStream io.Writer, terraformResponse *config.PrepareTerraformResponse, download bool) error

ConfigureBackend runs terraform init as part of the release in order to download providers and modules.

func (*Container) CopyTerraformLockIfExists added in v0.49.0

func (terraformContainer *Container) CopyTerraformLockIfExists(outputStream, errorStream io.Writer) error

func (*Container) Done

func (terraformContainer *Container) Done() error

Done stops and removes the terraform container.

func (*Container) InitInitial added in v0.57.0

func (terraformContainer *Container) InitInitial(outputStream, errorStream io.Writer) error

InitInitial runs terraform init as part of the release in order to download providers and modules.

func (*Container) RunCommand

func (terraformContainer *Container) RunCommand(cmd []string, env map[string]string, outputStream, errorStream io.Writer) error

RunCommand execs a command inside the terraform container.

func (*Container) RunInteractiveCommand added in v0.41.0

func (terraformContainer *Container) RunInteractiveCommand(
	cmd []string,
	env map[string]string,
	inputStream io.Reader,
	outputStream,
	errorStream io.Writer,
	tty bool,
	interactive bool) error

RunInteractiveCommand execs a command inside the terraform container.

func (*Container) SwitchWorkspace

func (terraformContainer *Container) SwitchWorkspace(name string, outputStream, errorStream io.Writer) error

SwitchWorkspace switched to a named workspace, creating it if necessary.

type NamedTerrafromBackendConfigParameter added in v0.36.0

type NamedTerrafromBackendConfigParameter struct {
	Name      string
	Parameter *config.TerrafromBackendConfigParameter
}

NamedTerrafromBackendConfigParameter is a terraform backend config parameter with a name.

func SortTerraformBackendConfigParameters added in v0.36.0

func SortTerraformBackendConfigParameters(input map[string]*config.TerrafromBackendConfigParameter) []NamedTerrafromBackendConfigParameter

SortTerraformBackendConfigParameters sorts a map of terraform backend config parameters.

type Pair added in v0.31.0

type Pair struct {
	Key   string
	Value string
}

Pair is item in a map.

func DictToSortedPairs added in v0.31.0

func DictToSortedPairs(input map[string]string) []Pair

DictToSortedPairs takes a map of strings and returns a list of Pairs sorted by key (meh go).

Jump to

Keyboard shortcuts

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