Documentation
¶
Overview ¶
Package tfexec runs OpenTofu/Terraform commands for Podplane-managed stacks.
Index ¶
- Constants
- type CLI
- func (c *CLI) Apply(ctx context.Context, dir string, autoApprove bool) error
- func (c *CLI) Destroy(ctx context.Context, dir string, autoApprove bool) error
- func (c *CLI) Init(ctx context.Context, dir string) error
- func (c *CLI) InitBackendDisabled(ctx context.Context, dir string) error
- func (c *CLI) OutputJSON(ctx context.Context, dir string) ([]byte, error)
- func (c *CLI) Platform(ctx context.Context) (string, error)
- func (c *CLI) ProvidersLock(ctx context.Context, dir, mirrorDir string, platforms []string) error
- func (c *CLI) ProvidersMirror(ctx context.Context, dir, mirrorDir, platform string) error
- func (c *CLI) WithCLIConfig(path string) *CLI
- type Executor
Constants ¶
const CommandEnvVar = "PODPLANE_TF_CMD"
CommandEnvVar selects the OpenTofu or Terraform command used by Podplane.
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 (*CLI) InitBackendDisabled ¶ added in v0.9.0
InitBackendDisabled initializes dependencies without configuring a backend.
func (*CLI) OutputJSON ¶
OutputJSON runs OpenTofu/Terraform output -json in dir.
func (*CLI) Platform ¶ added in v0.9.0
Platform returns the platform reported by the selected engine.
func (*CLI) ProvidersLock ¶ added in v0.9.0
ProvidersLock records provider checksums for platforms from mirrorDir.
func (*CLI) ProvidersMirror ¶ added in v0.9.0
ProvidersMirror downloads provider packages for platform into mirrorDir.
func (*CLI) WithCLIConfig ¶ added in v0.9.0
WithCLIConfig returns a copy that uses path as TF_CLI_CONFIG_FILE.
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.