infra

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package infra executes the Podmin CLI's embedded infrastructure modules.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActiveCommands added in v0.2.0

func ActiveCommands(ctx context.Context) ([]string, error)

ActiveCommands returns locally running OpenTofu and Terraform executables.

func Clean

func Clean(clusterID string) error

Clean removes generated infrastructure for a disconnected cluster.

func ForceUnlock added in v0.2.0

func ForceUnlock(ctx context.Context, variables Variables, id string, input io.Reader, output, stderr io.Writer) error

ForceUnlock removes one confirmed stale state lock.

func Prepare

func Prepare(variables Variables) error

Prepare replaces a cluster's generated module without executing it.

func Run

func Run(ctx context.Context, variables Variables, destroy, autoApprove bool, input io.Reader, output, stderr io.Writer) error

Run writes and executes the module in the inspectable cluster cache.

func SelectCommand

func SelectCommand() (string, error)

SelectCommand finds the configured OpenTofu/Terraform executable.

func WorkDir

func WorkDir(clusterID string) (string, error)

WorkDir returns the generated infrastructure directory for a cluster.

Types

type LockError added in v0.2.0

type LockError struct {
	ID string
	// contains filtered or unexported fields
}

LockError reports an existing OpenTofu or Terraform state lock.

func (*LockError) Error added in v0.2.0

func (e *LockError) Error() string

Error implements error.

func (*LockError) Unwrap added in v0.2.0

func (e *LockError) Unwrap() error

Unwrap returns the engine error which reported the lock.

type NodeGroup

type NodeGroup struct {
	Size         int    `json:"size"`
	InstanceType string `json:"instance_type"`
	Architecture string `json:"architecture"`
	UserData     string `json:"user_data"`
}

NodeGroup is an authoritative AWS compute NodeGroup.

func ParseNodeGroup

func ParseNodeGroup(value string) (string, NodeGroup, error)

ParseNodeGroup parses NAME[,size=N][,instance-type=TYPE].

type ObjectStore

type ObjectStore interface {
	Get(context.Context, string) ([]byte, string, error)
}

ObjectStore gets one object and its opaque version.

type Variables

type Variables struct {
	ClusterID   string               `json:"cluster_id"`
	Region      string               `json:"region"`
	Profile     string               `json:"profile"`
	Bucket      string               `json:"bucket"`
	VPCCIDR     string               `json:"vpc_cidr"`
	ManageVPC   bool                 `json:"manage_vpc"`
	SubnetCIDRs map[string]string    `json:"subnet_cidrs"`
	NodeGroups  map[string]NodeGroup `json:"nodegroups"`
}

Variables are values passed to the module as JSON.

func Restore

func Restore(ctx context.Context, provider ObjectStore, selected config.Context) (Variables, error)

Restore recreates generated files after disconnect clears the cache.

Directories

Path Synopsis
Package aws contains the Podmin CLI's embedded AWS infrastructure module.
Package aws contains the Podmin CLI's embedded AWS infrastructure module.

Jump to

Keyboard shortcuts

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