infra

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2025 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ApplyCmd = &cli.Command{
	Name:   "apply",
	Usage:  "Creates or updates infrastructure based off the apps and resources defined in app.json",
	Action: cmdtools.Wrap(Apply),
}
View Source
var Command = &cli.Command{
	Name:        "infra",
	Usage:       "Provision and manage cloud infrastructure",
	Description: "Commands for planning and applying infrastructure changes defined in app.json",
	Commands: []*cli.Command{
		PlanCmd,
		ApplyCmd,
		DestroyCmd,
		OutputCmd,
	},
	Before: func(ctx context.Context, command *cli.Command) (context.Context, error) {
		_, err := infra.ParseTFEnvironment()
		if err != nil {

			return ctx, errors.Wrap(err, "must include infra variables in PATH")
		}
		return ctx, nil
	},
}

Command defines the infra commands for provisioning and managing cloud infrastructure based on app.json definitions.

View Source
var DestroyCmd = &cli.Command{
	Name:   "destroy",
	Usage:  "Tears down infrastructure defined in app.json",
	Action: cmdtools.Wrap(Destroy),
}
View Source
var OutputCmd = &cli.Command{
	Name:        "output",
	Usage:       "Retrieve Terraform outputs from a specific environment",
	Description: "Fetches infrastructure outputs for resources provisioned by Terraform",
	Flags: []cli.Flag{
		&cli.StringFlag{
			Name:     "env",
			Usage:    "Environment to fetch outputs from (development, staging, production)",
			Aliases:  []string{"e"},
			Required: true,
		},
		&cli.StringFlag{
			Name:    "resource",
			Usage:   "Filter outputs to a specific resource name",
			Aliases: []string{"r"},
		},
		&cli.StringFlag{
			Name:    "app",
			Usage:   "Filter outputs to a specific app name",
			Aliases: []string{"a"},
		},
	},
	Action: cmdtools.Wrap(Output),
}
View Source
var PlanCmd = &cli.Command{
	Name:   "plan",
	Usage:  "Generates an executive plan from the apps and resources defined in app.json",
	Action: cmdtools.Wrap(Plan),
}

Functions

func Apply

func Apply(ctx context.Context, input cmdtools.CommandInput) error

func Destroy

func Destroy(ctx context.Context, input cmdtools.CommandInput) error

func Output

func Output(ctx context.Context, input cmdtools.CommandInput) error

Output retrieves Terraform outputs from the specified environment. Supports filtering by resource name or app name.

func Plan

func Plan(ctx context.Context, input cmdtools.CommandInput) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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