cli

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: Apache-2.0 Imports: 55 Imported by: 4

Documentation

Index

Constants

View Source
const PulumiSkipConfirmationsEnvVar = "PULUMI_SKIP_CONFIRMATIONS"

PulumiSkipConfirmationsEnvVar is an environment variable that can be used to skip confirmation prompts. This matches the variable used by the core Pulumi CLI.

Variables

This section is empty.

Functions

func New

func New(opts *Options) *cobra.Command

New creates a new ESC CLI instance.

func NewClient added in v0.6.1

func NewClient(ctx context.Context) (*workspace.Account, client.Client, error)

NewClient returns a new client.Client with the same credentials as would be used by the ESC CLI.

func PrepareEnvironment added in v0.6.0

func PrepareEnvironment(e *esc.Environment, opts *PrepareOptions) (files, environ, secrets []string, err error)

PrepareEnvironment prepares the envvar and temporary file projections for an environment. Returns the paths to temporary files, environment variable pairs, and secret values.

Types

type DeletionProtectedSetting added in v0.20.0

type DeletionProtectedSetting struct{}

func (*DeletionProtectedSetting) GetValue added in v0.20.0

func (*DeletionProtectedSetting) HelpText added in v0.20.0

func (s *DeletionProtectedSetting) HelpText() string

func (*DeletionProtectedSetting) KebabName added in v0.20.0

func (s *DeletionProtectedSetting) KebabName() string

func (*DeletionProtectedSetting) SetValue added in v0.20.0

func (*DeletionProtectedSetting) ValidateValue added in v0.20.0

func (s *DeletionProtectedSetting) ValidateValue(raw string) (bool, error)

ValidateValue accepts only "true" and "false" strings, unlike the general env {get,set} commands which parse YAML and accept broader boolean values like "yes", "no", "on", "off", etc. This restriction maintains compatibility while limiting the accepted subset to a well-defined interface that can be reliably parsed and validated.

type EnvSettingsRegistry added in v0.20.0

type EnvSettingsRegistry struct {
	Settings map[settingName]UntypedSetting
}

func NewEnvSettingsRegistry added in v0.20.0

func NewEnvSettingsRegistry() *EnvSettingsRegistry

func (*EnvSettingsRegistry) GetSetting added in v0.20.0

func (r *EnvSettingsRegistry) GetSetting(name string) (UntypedSetting, bool)

func (*EnvSettingsRegistry) GetSettingsHelpText added in v0.20.0

func (r *EnvSettingsRegistry) GetSettingsHelpText() string

type Options

type Options struct {
	ParentPath string
	UserAgent  string

	Stdin  io.Reader
	Stdout io.Writer
	Stderr io.Writer

	Colors colors.Colorization

	Login           httpstate.LoginManager
	PulumiWorkspace workspace.PulumiWorkspace
	// contains filtered or unexported fields
}

type PrepareOptions added in v0.6.0

type PrepareOptions struct {
	Quote   bool // True to quote environment variable values
	Pretend bool // True to skip actually writing temporary files
	Redact  bool // True to redact secrets. Ignored unless Pretend is set.
	// contains filtered or unexported fields
}

PrepareOptions contains options for PrepareEnvironment.

type Setting added in v0.20.0

type Setting[T any] interface {
	KebabName() string
	HelpText() string
	ValidateValue(raw string) (T, error)
	GetValue(settings *client.EnvironmentSettings) T
	SetValue(req *client.PatchEnvironmentSettingsRequest, value T)
}

type UntypedSetting added in v0.20.0

type UntypedSetting = Setting[any]

UntypedSetting and settingBox wrap a typed setting to allow homogeneous storage in the registry map.

Directories

Path Synopsis
Package client implements a client for the Pulumi Service HTTP/REST API.
Package client implements a client for the Pulumi Service HTTP/REST API.

Jump to

Keyboard shortcuts

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