tf

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Apr 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 whose version meets the min/max version constraint. It first tries to find from the local OS PATH. If there is no match, it will then download the release of the minVersion from hashicorp to the tfDir.

func NewCleanupErrorReport

func NewCleanupErrorReport(applyErr error, logs []paltypes.RequestTrace) types.ErrorReport

func NewCoverageReport

func NewCoverageReport(plan *tfjson.Plan, swaggerPath string) (coverage.CoverageReport, error)

func NewCoverageReportFromState

func NewCoverageReportFromState(state *tfjson.State, swaggerPath string) (coverage.CoverageReport, error)

func NewDiffReport

func NewDiffReport(plan *tfjson.Plan, logs []paltypes.RequestTrace) types.DiffReport

func NewErrorReport

func NewErrorReport(applyErr error, logs []paltypes.RequestTrace) types.ErrorReport

func NewIdAddressFromState

func NewIdAddressFromState(state *tfjson.State) map[string]string

func NewPassReport

func NewPassReport(plan *tfjson.Plan) types.PassReport

func NewPassReportFromState

func NewPassReportFromState(state *tfjson.State) types.PassReport

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) Init

func (t *Terraform) Init() error

func (*Terraform) Plan

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

func (*Terraform) SetLogEnabled

func (t *Terraform) SetLogEnabled(enabled bool)

func (*Terraform) Show

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

func (*Terraform) Validate

func (t *Terraform) Validate() (*tfjson.ValidateOutput, error)

Jump to

Keyboard shortcuts

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