plan

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2025 License: MIT Imports: 12 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package plan provides the command to plan infrastructure changes.

Index

Constants

This section is empty.

Variables

View Source
var PlanCmd = &cobra.Command{
	Use:     "plan",
	Example: `  contextvibes factory plan`,
	Args:    cobra.NoArgs,
	RunE: func(cmd *cobra.Command, _ []string) error {
		presenter := ui.NewPresenter(cmd.OutOrStdout(), cmd.ErrOrStderr())
		ctx := cmd.Context()

		cwd, err := os.Getwd()
		if err != nil {
			return fmt.Errorf("failed to get working directory: %w", err)
		}

		projType, err := project.Detect(cwd)
		if err != nil {
			return fmt.Errorf("failed to detect project type: %w", err)
		}

		switch projType {
		case project.Terraform:
			return executeTerraformPlan(ctx, presenter, globals.ExecClient, cwd)
		case project.Pulumi:
			return executePulumiPreview(ctx, presenter, globals.ExecClient, cwd)
		case project.Go, project.Python, project.Unknown:
			fallthrough
		default:
			presenter.Info("Plan command is not applicable for this project type.")

			return nil
		}
	},
}

PlanCmd represents the plan command.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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