terraform

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 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

This section is empty.

Types

type Client

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

func NewClient

func NewClient() (*Client, error)

func (*Client) RunCommandWithVersion

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

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

func (*Client) RunInitAndEnv

func (c *Client) RunInitAndEnv(log *logging.SimpleLogger, path string, env string, extraInitArgs []string, version *version.Version) ([]string, error)

RunInitAndEnv executes "terraform init" and "terraform env select" in path. env is the environment to select and extraInitArgs are additional arguments applied to the init command.

func (*Client) Version

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

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

type Runner

type Runner interface {
	Version() *version.Version
	RunCommandWithVersion(log *logging.SimpleLogger, path string, args []string, v *version.Version, env string) (string, error)
	RunInitAndEnv(log *logging.SimpleLogger, path string, env string, extraInitArgs []string, version *version.Version) ([]string, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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