terraform

package
v0.0.0-...-bed0df6 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2017 License: Apache-2.0 Imports: 2 Imported by: 0

README

Terraform SDK

In an effort to vendor the Terraform code base directly into another Go program I have written a (somewhat hacky) SDK for Terraform.

It is important to note that this is an unofficial port of the program and absolutely nothing is supported.

A lot of the code in the tfmain directory is copypasta from the terraform code base, and was pulled into a new package for ancillary reasons in getting the code to vendor smoothly. It is important to note that this a high level abstraction of the Terraform code base. The SDK supports hooking into the program in the same way a user would interact with the program via the CLI, except through idiomatic Go.

The original code base (and it's fabulous Mozilla Public License 2.0) can be found here. A huge thanks to the amazing people at Hashicorp and the open source Terraform community for giving us this amazing open source tool. We are all very grateful!

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TerraformCommand

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

TerraformCommand represents a terraform command a user would type on the command line

func NewTerraformCommand

func NewTerraformCommand(args []string) *TerraformCommand

NewTerraformCommand will initialize a Terraform command based on a slice of arguments that will map to a Terraform command. Example:

[
   "terraform",
   "init",
   "/path/to/my/config/dir/"
]

func (*TerraformCommand) Run

func (t *TerraformCommand) Run() (int, error)

Run will attempt to run the command and return an exit code that would be how Terraform would have exited.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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