tf

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: MPL-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindTerraform

func FindTerraform(ctx context.Context) (string, error)

FindTerraform finds the path to the terraform executable.

Types

type Action

type Action string
const (
	ActionCreate  Action = "create"
	ActionReplace Action = "replace"
	ActionUpdate  Action = "update"
	ActionDelete  Action = "delete"
)

func GetChanges

func GetChanges(plan *tfjson.Plan) []Action

type Actions

type Actions []Action

Actions denotes a valid change type.

type Terraform

type Terraform struct {
	LogEnabled bool
	// contains filtered or unexported fields
}

func NewTerraform

func NewTerraform(workingDirectory string, logEnabled bool) (*Terraform, error)

func (*Terraform) Apply

func (t *Terraform) Apply() error

func (*Terraform) Destroy

func (t *Terraform) Destroy() error

func (*Terraform) GetExec

func (t *Terraform) GetExec() *tfexec.Terraform

func (*Terraform) GetWorkingDirectory

func (t *Terraform) GetWorkingDirectory() string

func (*Terraform) Import

func (t *Terraform) Import(address string, id string) error

func (*Terraform) ImportAdd

func (t *Terraform) ImportAdd(address string, id string) (string, error)

func (*Terraform) Init

func (t *Terraform) Init() error

func (*Terraform) ListGenericResources

func (t *Terraform) ListGenericResources(p *tfjson.Plan) []types.GenericResource

func (*Terraform) ListGenericUpdateResources

func (t *Terraform) ListGenericUpdateResources(p *tfjson.Plan) []types.GenericUpdateResource

func (*Terraform) Plan

func (t *Terraform) Plan() (*tfjson.Plan, error)

func (*Terraform) RefreshState added in v0.5.0

func (t *Terraform) RefreshState(resources []string) error

func (*Terraform) SetLogEnabled

func (t *Terraform) SetLogEnabled(enabled bool)

func (*Terraform) Show

func (t *Terraform) Show() (*tfjson.State, error)

Jump to

Keyboard shortcuts

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