terraform

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package terraform handles the actual running of terraform commands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustConstraint added in v0.2.2

func MustConstraint(v string) version.Constraints

MustConstraint will parse one or more constraints from the given constraint string. The string must be a comma-separated list of constraints. It panics if there is an error.

Types

type Client

type Client interface {
	Version() *version.Version
	RunCommandWithVersion(log *logging.SimpleLogger, path string, args []string, v *version.Version, workspace string) (string, error)
	Init(log *logging.SimpleLogger, path string, workspace string, extraInitArgs []string, version *version.Version) ([]string, error)
}

type DefaultClient added in v0.2.2

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

func NewClient

func NewClient() (*DefaultClient, error)

func (*DefaultClient) Init added in v0.2.2

func (c *DefaultClient) Init(log *logging.SimpleLogger, path string, workspace string, extraInitArgs []string, version *version.Version) ([]string, error)

Init executes "terraform init" and "terraform workspace select" in path. workspace is the workspace to select and extraInitArgs are additional arguments applied to the init command. version is the terraform version being executed. Init is guaranteed to be called with version >= 0.9 since the init command was only introduced in that version. It properly handles the renaming of the env command to workspace since 0.10.

Returns the string outputs of running each command.

func (*DefaultClient) RunCommandWithVersion added in v0.2.2

func (c *DefaultClient) RunCommandWithVersion(log *logging.SimpleLogger, path string, args []string, v *version.Version, workspace string) (string, error)

RunCommandWithVersion executes the provided version of terraform with the provided args in path. v is the version of terraform executable to use and workspace is the workspace specified by the user commenting "atlantis plan/apply {workspace}" which is set to "default" by default.

func (*DefaultClient) Version added in v0.2.2

func (c *DefaultClient) Version() *version.Version

Version returns the version of the terraform executable in our $PATH.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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