tfexec

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package tfexec runs OpenTofu/Terraform commands for Podplane-managed stacks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLI

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

CLI runs OpenTofu/Terraform by invoking a local executable.

func NewCLI

func NewCLI() (*CLI, error)

NewCLI finds tofu or terraform on PATH and returns a CLI executor.

func (*CLI) Apply

func (c *CLI) Apply(ctx context.Context, dir string, autoApprove bool) error

Apply runs OpenTofu/Terraform apply in dir.

func (*CLI) Destroy

func (c *CLI) Destroy(ctx context.Context, dir string, autoApprove bool) error

Destroy runs OpenTofu/Terraform destroy in dir.

func (*CLI) Init

func (c *CLI) Init(ctx context.Context, dir string) error

Init runs OpenTofu/Terraform init in dir.

func (*CLI) OutputJSON

func (c *CLI) OutputJSON(ctx context.Context, dir string) ([]byte, error)

OutputJSON runs OpenTofu/Terraform output -json in dir.

type Executor

type Executor interface {
	Init(ctx context.Context, dir string) error
	Apply(ctx context.Context, dir string, autoApprove bool) error
	Destroy(ctx context.Context, dir string, autoApprove bool) error
	OutputJSON(ctx context.Context, dir string) ([]byte, error)
}

Executor runs OpenTofu/Terraform operations for a generated stack.

Jump to

Keyboard shortcuts

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