stack

package
v1.21.2 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2026 License: MIT Imports: 34 Imported by: 0

README

spacectl stack state

spacectl stack state manages Terraform/OpenTofu state files for Spacelift stacks.

pull

Downloads the current state file for a stack.

# Output to stdout
spacectl stack state pull --id my-stack

# Save to file
spacectl stack state pull --id my-stack -o terraform.tfstate

# Auto-detect stack from current directory
spacectl stack state pull

# Pretty-print
spacectl stack state pull --id my-stack | jq .
Prerequisites

The stack must have:

  • Manages state enabled (Spacelift manages the Terraform state)
  • External state access enabled (stack setting)

The user must have State download permission or Space admin role.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Command

func Command() cmd.Command

Command returns the stack command subtree.

func RegisterMCPTools added in v1.12.0

func RegisterMCPTools(s *server.MCPServer, options McpOptions)

Types

type ConfigInput added in v0.7.1

type ConfigInput struct {
	ID        graphql.ID      `json:"id"`
	Type      ConfigType      `json:"type"`
	Value     graphql.String  `json:"value"`
	WriteOnly graphql.Boolean `json:"writeOnly"`
}

ConfigInput represents the input required to create or update a config element.

type ConfigType added in v0.7.1

type ConfigType string

ConfigType is a type of configuration element.

type EnvironmentVariable added in v0.21.0

type EnvironmentVariable struct {
	Key   graphql.String `json:"key"`
	Value graphql.String `json:"value"`
}

EnvironmentVariable represents a key-value pair of environment variables

type LocalPreviewOptions added in v1.12.0

type LocalPreviewOptions struct {
	StackID            string
	EnvironmentVars    []EnvironmentVariable
	Targets            []string
	Path               *string
	FindRepositoryRoot bool
	DisregardGitignore bool
	UseHeaders         bool
	NoUpload           bool
	RunMetadata        *string
	PrioritizeRun      bool
	ShowUploadProgress bool
	IncludeGitDir      bool
}

type McpOptions added in v1.12.0

type McpOptions struct {
	UseHeadersForLocalPreview bool
}

type RuntimeConfigInput added in v1.10.0

type RuntimeConfigInput struct {
	Yaml *string `json:"yaml"`
}

RuntimeConfigInput represents the input for triggering a run with a runtime configuration.

type StackFilter added in v1.17.1

type StackFilter[T hasIDAndName] func(*T) bool

StackFilter is a function to filter stacks based on their properties.

type StateDownloadUrlInput added in v1.21.0

type StateDownloadUrlInput struct {
	StackID graphql.ID `json:"stackId"`
}

Jump to

Keyboard shortcuts

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