exec

package
v1.201.0-test.4 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2025 License: Apache-2.0 Imports: 102 Imported by: 0

Documentation

Overview

Package exec is a generated GoMock package.

Package exec is a generated GoMock package.

Package exec is a generated GoMock package.

Package exec is a generated GoMock package.

Package exec is a generated GoMock package.

Package exec is a generated GoMock package.

Package exec is a generated GoMock package.

Index

Constants

View Source
const (
	DefaultFileMode os.FileMode = 0o644
)
View Source
const (
	DefaultIncludeEmpty = true
)

Variables

View Source
var (
	ErrParseTerraformComponents  = errors.New("could not parse Terraform components")
	ErrParseComponentsAttributes = errors.New("could not parse component attributes")
	ErrDescribeStack             = errors.New("error describe stacks")
	ErrEmptyPath                 = errors.New("path cannot be empty")
	ErrPathNotExist              = errors.New("path not exist")
	ErrFileStat                  = errors.New("error get file stat")
	ErrMatchPattern              = errors.New("error matching pattern")
	ErrReadDir                   = errors.New("error reading directory")
	ErrFailedFoundStack          = errors.New("failed to find stack folders")
	ErrCollectFiles              = errors.New("failed to collect files")
	ErrEmptyEnvDir               = errors.New("ENV TF_DATA_DIR is empty")
	ErrResolveEnvDir             = errors.New("error resolving TF_DATA_DIR path")
	ErrRefusingToDeleteDir       = errors.New("refusing to delete root directory")
	ErrRefusingToDelete          = errors.New("refusing to delete directory containing")
	ErrRootPath                  = errors.New("root path cannot be empty")
	ErrUserAborted               = errors.New("mission aborted")
)
View Source
var (
	ErrInvalidFormat                      = errors.New("invalid format")
	ErrCreatingTempDirectory              = errors.New("error creating temporary directory")
	ErrCreatingIntermediateSubdirectories = errors.New("error creating intermediate subdirectories")
	ErrGettingJsonForPlanfile             = errors.New("error getting JSON for planfile")
	ErrConvertingJsonToGoType             = errors.New("error converting JSON to Go type")
	ErrNoComponent                        = errors.New("no component specified")
)
View Source
var (
	ErrVendorConfigNotExist       = errors.New("the '--everything' flag is set, but vendor config file does not exist")
	ErrExecuteVendorDiffCmd       = errors.New("'atmos vendor diff' is not implemented yet")
	ErrValidateComponentFlag      = errors.New("either '--component' or '--tags' flag can be provided, but not both")
	ErrValidateComponentStackFlag = errors.New("either '--component' or '--stack' flag can be provided, but not both")
	ErrValidateEverythingFlag     = errors.New("'--everything' flag cannot be combined with '--component', '--stack', or '--tags' flags")
	ErrMissingComponent           = errors.New("to vendor a component, the '--component' (shorthand '-c') flag needs to be specified.\n" +
		"Example: atmos vendor pull -c <component>")
)
View Source
var (
	ErrMissingMixinURI             = errors.New("'uri' must be specified for each 'mixin' in the 'component.yaml' file")
	ErrMissingMixinFilename        = errors.New("'filename' must be specified for each 'mixin' in the 'component.yaml' file")
	ErrMixinEmpty                  = errors.New("mixin URI cannot be empty")
	ErrMixinNotImplemented         = errors.New("local mixin installation not implemented")
	ErrStackPullNotSupported       = errors.New("command 'atmos vendor pull --stack <stack>' is not supported yet")
	ErrComponentConfigFileNotFound = errors.New("component vendoring config file does not exist in the folder")
	ErrFolderNotFound              = errors.New("folder does not exist")
	ErrInvalidComponentKind        = errors.New("invalid 'kind' in the component vendoring config file. Supported kinds: 'ComponentVendorConfig'")
	ErrUriMustSpecified            = errors.New("'uri' must be specified in 'source.uri' in the component vendoring config file")
)
View Source
var (
	ErrVendorComponents              = errors.New("failed to vendor components")
	ErrSourceMissing                 = errors.New("'source' must be specified in 'sources' in the vendor config file")
	ErrTargetsMissing                = errors.New("'targets' must be specified for the source in the vendor config file")
	ErrVendorConfigSelfImport        = errors.New("vendor config file imports itself in 'spec.imports'")
	ErrMissingVendorConfigDefinition = errors.New("either 'spec.sources' or 'spec.imports' (or both) must be defined in the vendor config file")
	ErrVendoringNotConfigured        = errors.New("Vendoring is not configured. To set up vendoring, please see https://atmos.tools/core-concepts/vendor/")
	ErrPermissionDenied              = errors.New("Permission denied when accessing")
	ErrEmptySources                  = errors.New("'spec.sources' is empty in the vendor config file and the imports")
	ErrNoComponentsWithTags          = errors.New("there are no components in the vendor config file")
	ErrNoYAMLConfigFiles             = errors.New("no YAML configuration files found in directory")
	ErrDuplicateComponents           = errors.New("duplicate component names")
	ErrDuplicateImport               = errors.New("Duplicate import")
	ErrDuplicateComponentsFound      = errors.New("duplicate component")
	ErrComponentNotDefined           = errors.New("the flag '--component' is passed, but the component is not defined in any of the 'sources' in the vendor config file and the imports")
)

Workflow error aliases from errors package for backward compatibility.

View Source
var (
	ErrStoreNotFound         = errors.New("store not found")
	ErrGetKeyFailed          = errors.New("failed to get key from store")
	ErrInvalidPipeParams     = errors.New("invalid parameters after pipe")
	ErrInvalidPipeIdentifier = errors.New("invalid identifier after pipe")
)

Common errors for store YAML functions.

View Source
var ErrInvalidFilePath = errors.New("invalid file path")
View Source
var ErrInvalidYAML = fmt.Errorf("invalid YAML")
View Source
var (
	// ErrNoJSONOutput is returned when no JSON output is found in terraform show output.
	ErrNoJSONOutput = errors.New("no JSON output found in terraform show output")
)

Static errors.

View Source
var ErrNoLayers = errors.New("the OCI image does not have any layers")
View Source
var ErrRelPath = errors.New("error determining relative path")
View Source
var ErrRepoPathConflict = errors.New("if the '--repo-path' flag is specified, the '--ref', '--sha', '--ssh-key' and '--ssh-key-password' flags can't be used")
View Source
var ErrTTYNotSupported = fmt.Errorf("tty not supported for this command")
View Source
var RemoteRepoIsNotGitRepoError = errors.New("the target remote repo is not a Git repository. Check that it was initialized and has '.git' folder")
View Source
var StderrLogger = func() *log.AtmosLogger {
	l := log.New()
	l.SetOutput(os.Stderr)
	return l
}()

Dedicated logger for stderr to keep stdout clean of detailed messaging, e.g. for files vendoring.

Functions

func BuildAtlantisProjectNameFromComponentConfig added in v1.31.0

func BuildAtlantisProjectNameFromComponentConfig(
	atmosConfig *schema.AtmosConfiguration,
	configAndStacksInfo schema.ConfigAndStacksInfo,
) (string, error)

BuildAtlantisProjectNameFromComponentConfig builds an Atlantis project name from the component config.

func BuildComponentPath added in v1.31.0

func BuildComponentPath(
	atmosConfig *schema.AtmosConfiguration,
	componentSectionMap *map[string]any,
	componentType string,
) string

BuildComponentPath builds component path (path to the component's physical location on disk).

func BuildDependentStackNameFromDependsOn added in v1.33.2

func BuildDependentStackNameFromDependsOn(
	currentComponentName string,
	currentStackName string,
	dependsOnComponentName string,
	dependsOnStackName string,
	allStackNames []string,
) (string, error)

BuildDependentStackNameFromDependsOn builds the dependent stack name from "settings.depends_on" config.

func BuildDependentStackNameFromDependsOnLegacy added in v1.50.0

func BuildDependentStackNameFromDependsOnLegacy(
	dependsOn string,
	allStackNames []string,
	currentStackName string,
	componentNamesInCurrentStack []string,
	currentComponentName string,
) (string, error)

BuildDependentStackNameFromDependsOnLegacy builds the dependent stack name from "settings.spacelift.depends_on" config.

func BuildSpaceliftStackName added in v1.24.0

func BuildSpaceliftStackName(spaceliftSettings map[string]any, context schema.Context, contextPrefix string) (string, string, error)

BuildSpaceliftStackName builds a Spacelift stack name from the provided context and stack name pattern.

func BuildSpaceliftStackNameFromComponentConfig added in v1.31.0

func BuildSpaceliftStackNameFromComponentConfig(
	atmosConfig *schema.AtmosConfiguration,
	configAndStacksInfo schema.ConfigAndStacksInfo,
) (string, error)

BuildSpaceliftStackNameFromComponentConfig builds Spacelift stack name from the component config.

func BuildSpaceliftStackNames added in v1.31.0

func BuildSpaceliftStackNames(stacks map[string]any, stackNamePattern string) ([]string, error)

BuildSpaceliftStackNames builds Spacelift stack names.

func BuildTerraformWorkspace added in v1.4.8

func BuildTerraformWorkspace(atmosConfig *schema.AtmosConfiguration, configAndStacksInfo schema.ConfigAndStacksInfo) (string, error)

BuildTerraformWorkspace builds Terraform workspace.

func ClearAWSIdentityCache added in v1.201.0

func ClearAWSIdentityCache()

ClearAWSIdentityCache clears the AWS identity cache. This is useful in tests or when credentials change during execution.

func ClearBaseComponentConfigCache added in v1.195.0

func ClearBaseComponentConfigCache()

ClearBaseComponentConfigCache clears the base component config cache. This should be called between independent operations (like tests) to ensure fresh processing.

func ClearFileContentCache added in v1.195.0

func ClearFileContentCache()

ClearFileContentCache clears the file content cache. This should be called between independent operations (like tests) to ensure fresh processing.

func ClearJsonSchemaCache added in v1.195.0

func ClearJsonSchemaCache()

ClearJsonSchemaCache clears the JSON schema cache. This should be called between independent operations (like tests) to ensure fresh processing.

func ClearLastMergeContext added in v1.194.0

func ClearLastMergeContext()

ClearLastMergeContext clears the stored merge context. Deprecated: Use ClearMergeContexts instead.

func ClearMergeContexts added in v1.194.0

func ClearMergeContexts()

ClearMergeContexts clears all stored merge contexts.

func ClearResolutionContext added in v1.196.0

func ClearResolutionContext()

ClearResolutionContext clears the resolution context for the current goroutine.

func ComponentOrMixinsCopy added in v1.168.0

func ComponentOrMixinsCopy(sourceFile, finalTarget string) error

ComponentOrMixinsCopy covers 2 cases: file-to-folder and file-to-file copy.

func ConvertComponentEnvSectionToList added in v1.196.0

func ConvertComponentEnvSectionToList(info *schema.ConfigAndStacksInfo)

ConvertComponentEnvSectionToList converts ComponentEnvSection map to ComponentEnvList slice. ComponentEnvSection is populated by auth hooks and stack config env sections. This function is used by terraform, helmfile, and packer execution to prepare environment variables.

func DeletePathTerraform added in v1.114.0

func DeletePathTerraform(fullPath string, objectName string) error

DeletePathTerraform deletes the specified file or folder with a checkmark or xmark.

func ExecAuthShellCommand added in v1.196.0

func ExecAuthShellCommand(
	atmosConfig *schema.AtmosConfiguration,
	identityName string,
	providerName string,
	authEnvVars map[string]string,
	shellOverride string,
	shellArgs []string,
) error

ExecAuthShellCommand starts a new interactive shell with the provided authentication environment variables. It increments ATMOS_SHLVL for the session, sets ATMOS_IDENTITY plus the supplied auth env vars into the shell environment (merged with the host environment), prints enter/exit messages, and launches the resolved shell command; returns an error if no suitable shell is found or if the shell process fails.

func ExecuteAtlantisGenerateRepoConfig added in v1.5.0

func ExecuteAtlantisGenerateRepoConfig(
	atmosConfig *schema.AtmosConfiguration,
	outputPath string,
	configTemplateNameArg string,
	projectTemplateNameArg string,
	stacks []string,
	components []string,
) error

ExecuteAtlantisGenerateRepoConfig generates repository configuration for Atlantis.

func ExecuteAtlantisGenerateRepoConfigAffectedOnly added in v1.30.0

func ExecuteAtlantisGenerateRepoConfigAffectedOnly(
	atmosConfig *schema.AtmosConfiguration,
	outputPath string,
	configTemplateName string,
	projectTemplateName string,
	ref string,
	sha string,
	repoPath string,
	sshKeyPath string,
	sshKeyPassword string,
	cloneTargetRef bool,
	stack string,
) error

ExecuteAtlantisGenerateRepoConfigAffectedOnly generates repository configuration for Atlantis only for the affected components and stacks.

func ExecuteAtlantisGenerateRepoConfigCmd added in v1.5.0

func ExecuteAtlantisGenerateRepoConfigCmd(cmd *cobra.Command, args []string) error

ExecuteAtlantisGenerateRepoConfigCmd executes 'atlantis generate repo-config' command.

func ExecuteAtmosCmd added in v1.54.0

func ExecuteAtmosCmd() error

ExecuteAtmosCmd executes `atmos` command.

func ExecuteAtmosVendorInternal added in v1.47.0

func ExecuteAtmosVendorInternal(params *executeVendorOptions) error

ExecuteAtmosVendorInternal downloads the artifacts from the sources and writes them to the targets.

func ExecuteAwsEksUpdateKubeconfig added in v1.4.9

func ExecuteAwsEksUpdateKubeconfig(kubeconfigContext schema.AwsEksUpdateKubeconfigContext) error

ExecuteAwsEksUpdateKubeconfig executes 'aws eks update-kubeconfig'. https://docs.aws.amazon.com/cli/latest/reference/eks/update-kubeconfig.html

func ExecuteAwsEksUpdateKubeconfigCommand added in v1.4.9

func ExecuteAwsEksUpdateKubeconfigCommand(cmd *cobra.Command, args []string) error

func ExecuteComponentVendorInternal added in v1.47.0

func ExecuteComponentVendorInternal(
	atmosConfig *schema.AtmosConfiguration,
	vendorComponentSpec *schema.VendorComponentSpec,
	component string,
	componentPath string,
	dryRun bool,
) error

func ExecuteDescribeAffectedWithTargetRefCheckout added in v1.71.0

func ExecuteDescribeAffectedWithTargetRefCheckout(
	atmosConfig *schema.AtmosConfiguration,
	ref string,
	sha string,
	includeSpaceliftAdminStacks bool,
	includeSettings bool,
	stack string,
	processTemplates bool,
	processYamlFunctions bool,
	skip []string,
	excludeLocked bool,
) ([]schema.Affected, *plumbing.Reference, *plumbing.Reference, string, error)

ExecuteDescribeAffectedWithTargetRefCheckout checks out the target reference, processes stack configs, and returns a list of the affected Atmos components and stacks given two Git commits.

func ExecuteDescribeAffectedWithTargetRefClone added in v1.71.0

func ExecuteDescribeAffectedWithTargetRefClone(
	atmosConfig *schema.AtmosConfiguration,
	ref string,
	sha string,
	sshKeyPath string,
	sshKeyPassword string,
	includeSpaceliftAdminStacks bool,
	includeSettings bool,
	stack string,
	processTemplates bool,
	processYamlFunctions bool,
	skip []string,
	excludeLocked bool,
) ([]schema.Affected, *plumbing.Reference, *plumbing.Reference, string, error)

ExecuteDescribeAffectedWithTargetRefClone clones the remote reference, processes stack configs, and returns a list of the affected Atmos components and stacks given two Git commits.

func ExecuteDescribeAffectedWithTargetRepoPath added in v1.26.0

func ExecuteDescribeAffectedWithTargetRepoPath(
	atmosConfig *schema.AtmosConfiguration,
	targetRefPath string,
	includeSpaceliftAdminStacks bool,
	includeSettings bool,
	stack string,
	processTemplates bool,
	processYamlFunctions bool,
	skip []string,
	excludeLocked bool,
) ([]schema.Affected, *plumbing.Reference, *plumbing.Reference, string, error)

ExecuteDescribeAffectedWithTargetRepoPath uses `repo-path` to access the target repo, and processes stack configs and returns a list of the affected Atmos components and stacks given two Git commits.

func ExecuteDescribeComponent

func ExecuteDescribeComponent(params *ExecuteDescribeComponentParams) (map[string]any, error)

ExecuteDescribeComponent describes component config.

func ExecuteDescribeDependents added in v1.33.2

func ExecuteDescribeDependents(
	atmosConfig *schema.AtmosConfiguration,
	args *DescribeDependentsArgs,
) ([]schema.Dependent, error)

ExecuteDescribeDependents produces a list of Atmos components in Atmos stacks that depend on the provided Atmos component.

func ExecuteDescribeStacks added in v1.4.4

func ExecuteDescribeStacks(
	atmosConfig *schema.AtmosConfiguration,
	filterByStack string,
	components []string,
	componentTypes []string,
	sections []string,
	ignoreMissingFiles bool,
	processTemplates bool,
	processYamlFunctions bool,
	includeEmptyStacks bool,
	skip []string,
	authManager auth.AuthManager,
) (map[string]any, error)

ExecuteDescribeStacks processes stack manifests and returns the final map of stacks and components.

func ExecuteDescribeWorkflows added in v1.55.0

func ExecuteDescribeWorkflows(
	atmosConfig schema.AtmosConfiguration,
) ([]schema.DescribeWorkflowsItem, map[string][]string, map[string]schema.WorkflowManifest, error)

ExecuteDescribeWorkflows executes `atmos describe workflows` command.

func ExecuteDocsGenerateCmd added in v1.175.0

func ExecuteDocsGenerateCmd(cmd *cobra.Command, args []string) error

ExecuteDocsGenerateCmd implements the 'atmos docs generate <doc-type>' logic.

func ExecuteHelmfile

func ExecuteHelmfile(info schema.ConfigAndStacksInfo) error

ExecuteHelmfile executes helmfile commands.

func ExecuteHelmfileCmd added in v1.11.0

func ExecuteHelmfileCmd(cmd *cobra.Command, args []string, additionalArgsAndFlags []string) error

ExecuteHelmfileCmd parses the provided arguments and flags and executes helmfile commands.

func ExecuteHelmfileGenerateVarfileCmd added in v1.11.0

func ExecuteHelmfileGenerateVarfileCmd(cmd *cobra.Command, args []string) error

ExecuteHelmfileGenerateVarfileCmd executes `helmfile generate varfile` command.

func ExecuteInstall added in v1.130.0

func ExecuteInstall(installer pkgVendor, dryRun bool, atmosConfig *schema.AtmosConfiguration) tea.Cmd

func ExecutePacker added in v1.186.0

func ExecutePacker(
	info *schema.ConfigAndStacksInfo,
	packerFlags *PackerFlags,
) error

ExecutePacker executes Packer commands.

func ExecutePackerOutput added in v1.186.0

func ExecutePackerOutput(
	info *schema.ConfigAndStacksInfo,
	packerFlags *PackerFlags,
) (any, error)

ExecutePackerOutput executes `atmos packer output` commands.

func ExecuteProLockCommand added in v1.87.0

func ExecuteProLockCommand(cmd *cobra.Command, args []string) error

ExecuteProLockCommand executes `atmos pro lock` command.

func ExecuteProUnlockCommand added in v1.87.0

func ExecuteProUnlockCommand(cmd *cobra.Command, args []string) error

ExecuteProUnlockCommand executes `atmos pro unlock` command.

func ExecuteShell added in v1.16.0

func ExecuteShell(
	command string,
	name string,
	dir string,
	env []string,
	dryRun bool,
) error

ExecuteShell runs a shell script.

func ExecuteShellCommand added in v1.4.9

func ExecuteShellCommand(
	atmosConfig schema.AtmosConfiguration,
	command string,
	args []string,
	dir string,
	env []string,
	dryRun bool,
	redirectStdError string,
) error

ExecuteShellCommand prints and executes the provided command with args and flags.

func ExecuteStackVendorInternal added in v1.47.0

func ExecuteStackVendorInternal(
	stack string,
	dryRun bool,
) error

ExecuteStackVendorInternal executes the command to vendor an Atmos stack. TODO: implement this.

func ExecuteTerraform

func ExecuteTerraform(info schema.ConfigAndStacksInfo) error

ExecuteTerraform executes terraform commands.

func ExecuteTerraformAffected added in v1.181.0

func ExecuteTerraformAffected(args *DescribeAffectedCmdArgs, info *schema.ConfigAndStacksInfo) error

ExecuteTerraformAffected executes `atmos terraform <command> --affected`.

func ExecuteTerraformGenerateBackendCmd added in v1.11.0

func ExecuteTerraformGenerateBackendCmd(cmd *cobra.Command, args []string) error

ExecuteTerraformGenerateBackendCmd executes `terraform generate backend` command.

func ExecuteTerraformGenerateBackends

func ExecuteTerraformGenerateBackends(
	atmosConfig *schema.AtmosConfiguration,
	fileTemplate string,
	format string,
	stacks []string,
	components []string,
) error

ExecuteTerraformGenerateBackends generates backend configs for all terraform components.

func ExecuteTerraformGenerateBackendsCmd added in v1.7.0

func ExecuteTerraformGenerateBackendsCmd(cmd *cobra.Command, args []string) error

ExecuteTerraformGenerateBackendsCmd executes `terraform generate backends` command.

func ExecuteTerraformGeneratePlanfile added in v1.172.0

func ExecuteTerraformGeneratePlanfile(
	options *PlanfileOptions,
	info *schema.ConfigAndStacksInfo,
) error

ExecuteTerraformGeneratePlanfile executes `terraform generate planfile`.

func ExecuteTerraformGeneratePlanfileCmd added in v1.172.0

func ExecuteTerraformGeneratePlanfileCmd(cmd *cobra.Command, args []string) error

ExecuteTerraformGeneratePlanfileCmd executes `terraform generate planfile` command.

func ExecuteTerraformGenerateVarfileCmd added in v1.11.0

func ExecuteTerraformGenerateVarfileCmd(cmd *cobra.Command, args []string) error

ExecuteTerraformGenerateVarfileCmd executes `terraform generate varfile` command.

func ExecuteTerraformGenerateVarfiles added in v1.5.0

func ExecuteTerraformGenerateVarfiles(
	atmosConfig *schema.AtmosConfiguration,
	fileTemplate string,
	format string,
	stacks []string,
	components []string,
) error

ExecuteTerraformGenerateVarfiles generates varfiles for all terraform components in all stacks.

func ExecuteTerraformGenerateVarfilesCmd added in v1.5.0

func ExecuteTerraformGenerateVarfilesCmd(cmd *cobra.Command, args []string) error

ExecuteTerraformGenerateVarfilesCmd executes `terraform generate varfiles` command.

func ExecuteTerraformQuery added in v1.181.0

func ExecuteTerraformQuery(info *schema.ConfigAndStacksInfo) error

ExecuteTerraformQuery executes `atmos terraform <command> --query <yq-expression --stack <stack>`.

func ExecuteValidateComponent added in v1.9.0

func ExecuteValidateComponent(
	atmosConfig *schema.AtmosConfiguration,
	configAndStacksInfo schema.ConfigAndStacksInfo,
	componentName string,
	stack string,
	schemaPath string,
	schemaType string,
	modulePaths []string,
	timeoutSeconds int,
) (bool, error)

ExecuteValidateComponent validates a component in a stack using JsonSchema or OPA schema documents.

func ExecuteValidateComponentCmd added in v1.9.0

func ExecuteValidateComponentCmd(cmd *cobra.Command, args []string) (string, string, error)

ExecuteValidateComponentCmd executes `validate component` command.

func ExecuteValidateStacksCmd added in v1.11.0

func ExecuteValidateStacksCmd(cmd *cobra.Command, args []string) error

ExecuteValidateStacksCmd executes `validate stacks` command.

func ExecuteVendorDiffCmd added in v1.11.0

func ExecuteVendorDiffCmd(cmd *cobra.Command, args []string) error

ExecuteVendorDiffCmd executes `vendor diff` commands.

func ExecuteVendorPullCmd added in v1.11.0

func ExecuteVendorPullCmd(cmd *cobra.Command, args []string) error

ExecuteVendorPullCmd executes `vendor pull` commands.

func ExecuteVendorPullCommand added in v1.47.0

func ExecuteVendorPullCommand(cmd *cobra.Command, args []string) error

ExecuteVendorPullCommand executes `atmos vendor` commands.

func ExecuteWorkflow added in v1.4.0

func ExecuteWorkflow(
	atmosConfig schema.AtmosConfiguration,
	workflowName string,
	workflowPath string,
	workflowDefinition *schema.WorkflowDefinition,
	dryRun bool,
	commandLineStack string,
	fromStep string,
	commandLineIdentity string,
) error

ExecuteWorkflow executes an Atmos workflow using the pkg/workflow executor. This function creates the appropriate adapters and delegates to the Executor.

func ExecuteWorkflowCmd added in v1.11.0

func ExecuteWorkflowCmd(cmd *cobra.Command, args []string) error

ExecuteWorkflowCmd executes an Atmos workflow.

func ExecuteWorkflowUI added in v1.81.0

func ExecuteWorkflowUI(atmosConfig schema.AtmosConfiguration) (string, string, string, error)

func FilterAbstractComponents added in v1.125.0

func FilterAbstractComponents(componentsMap map[string]any) []string

FilterAbstractComponents This function removes abstract components and returns the list of components.

func FilterComputedFields added in v1.194.0

func FilterComputedFields(componentSection map[string]any) map[string]any

FilterComputedFields removes Atmos-added fields that don't come from stack files. Only keeps fields that are defined in stack YAML files.

func FilterEmptySections added in v1.176.0

func FilterEmptySections(data map[string]any, includeEmpty bool) map[string]any

func FindComponentDependencies added in v1.42.0

func FindComponentDependencies(currentStack string, sources schema.ConfigSources) ([]string, []string, error)

FindComponentDependencies finds all imports that the component depends on, and all imports that the component has any sections defined in.

func FindComponentDependenciesLegacy added in v1.81.0

func FindComponentDependenciesLegacy(
	stack string,
	componentType string,
	component string,
	baseComponents []string,
	stackImports map[string]map[string]any,
) ([]string, error)

FindComponentDependenciesLegacy finds all imports where the component or the base component(s) are defined. Component depends on the imported config file if any of the following conditions is true:

  1. The imported config file has any of the global `backend`, `backend_type`, `env`, `remote_state_backend`, `remote_state_backend_type`, `settings` or `vars` sections which are not empty.
  2. The imported config file has the component type section, which has any of the `backend`, `backend_type`, `env`, `remote_state_backend`, `remote_state_backend_type`, `settings` or `vars` sections which are not empty.
  3. The imported config file has the cfg.ComponentsSectionName section, which has the component type section, which has the component section.
  4. The imported config file has the cfg.ComponentsSectionName section, which has the component type section, which has the base component(s) section, and the base component section is defined inline (not imported).

func FindComponentStacks added in v1.81.0

func FindComponentStacks(
	componentType string,
	component string,
	baseComponent string,
	componentStackMap map[string]map[string][]string,
) ([]string, error)

FindComponentStacks finds all infrastructure stack manifests where the component or the base component is defined.

func FindComponentsDerivedFromBaseComponents added in v1.81.0

func FindComponentsDerivedFromBaseComponents(
	stack string,
	allComponents map[string]any,
	baseComponents []string,
) ([]string, error)

FindComponentsDerivedFromBaseComponents finds all components that derive from the given base components.

func FindStacksMap added in v1.4.4

func FindStacksMap(atmosConfig *schema.AtmosConfiguration, ignoreMissingFiles bool) (
	map[string]any,
	map[string]map[string]any,
	error,
)

FindStacksMap processes stack config and returns a map of all stacks. Results are cached to avoid re-processing the same YAML files multiple times within the same command execution (e.g., when ValidateStacks is called before ExecuteDescribeStacks).

func FindValidationSection added in v1.9.0

func FindValidationSection(componentSection map[string]any) (schema.Validation, error)

FindValidationSection finds the 'validation' section in the component config.

func FormatList added in v1.179.0

func FormatList(items []string) string

FormatList formats a list of strings into a markdown bullet list. This is an alias to workflow.FormatList for backward compatibility.

func FuncMap added in v1.81.0

func FuncMap(
	atmosConfig *schema.AtmosConfiguration,
	configAndStacksInfo *schema.ConfigAndStacksInfo,
	ctx context.Context,
	gomplateData *data.Data,
) template.FuncMap

FuncMap creates and returns a map of template functions.

func GetComponentRemoteStateBackendStaticType added in v1.129.0

func GetComponentRemoteStateBackendStaticType(sections *map[string]any) map[string]any

GetComponentRemoteStateBackendStaticType returns the `remote_state_backend` section for a component in a stack.

func GetFileContent added in v1.81.0

func GetFileContent(filePath string) (string, error)

GetFileContent tries to read and return the file content from the sync map if it exists in the map, otherwise it reads the file, stores its content in the map and returns the content.

func GetFileContentWithoutCache added in v1.195.0

func GetFileContentWithoutCache(filePath string) (string, error)

GetFileContentWithoutCache reads file content without using the cache. Used when provenance tracking is enabled to ensure fresh reads with position tracking.

func GetIncludeEmptySetting added in v1.176.0

func GetIncludeEmptySetting(atmosConfig *schema.AtmosConfiguration) bool

func GetLastMergeContext added in v1.194.0

func GetLastMergeContext() *m.MergeContext

GetLastMergeContext retrieves the last stored merge context. Deprecated: Use GetMergeContextForStack instead.

func GetMergeContextForStack added in v1.194.0

func GetMergeContextForStack(stackFile string) *m.MergeContext

GetMergeContextForStack retrieves the merge context for a specific stack file.

func GetPackerManifestFromVars added in v1.186.0

func GetPackerManifestFromVars(vars *schema.AtmosSectionMapType) (string, error)

GetPackerManifestFromVars returns the Packer manifest filename from the `vars.manifest_file_name`.

func GetPackerTemplateFromSettings added in v1.186.0

func GetPackerTemplateFromSettings(settings *schema.AtmosSectionMapType) (string, error)

GetPackerTemplateFromSettings returns a Packer template name from the `settings.packer.template` section in the Atmos component manifest.

func GetStackNamePattern added in v1.66.0

func GetStackNamePattern(atmosConfig *schema.AtmosConfiguration) string

GetStackNamePattern returns the stack name pattern.

func GetStackNameTemplate added in v1.177.0

func GetStackNameTemplate(atmosConfig *schema.AtmosConfiguration) string

GetStackNameTemplate returns the stack name template.

func GetStaticRemoteStateOutput added in v1.183.0

func GetStaticRemoteStateOutput(
	atmosConfig *schema.AtmosConfiguration,
	component string,
	stack string,
	remoteStateSection map[string]any,
	output string,
) (any, bool, error)

GetStaticRemoteStateOutput returns static remote state output for a component in a stack.

func GetTerraformEnvCliArgs added in v1.193.0

func GetTerraformEnvCliArgs() []string

GetTerraformEnvCliArgs reads the TF_CLI_ARGS environment variable and returns a slice of arguments. Example: TF_CLI_ARGS="-var environment=prod -auto-approve -var region=us-east-1". Returns: ["-var", "environment=prod", "-auto-approve", "-var", "region=us-east-1"].

func GetTerraformEnvCliVars added in v1.193.0

func GetTerraformEnvCliVars() (map[string]any, error)

GetTerraformEnvCliVars reads the TF_CLI_ARGS environment variable, parses all `-var` arguments, and returns them as a map of variables with proper type conversion. This function processes JSON values and returns them as parsed objects. It handles both formats: -var key=value and -var=key=value. Example: TF_CLI_ARGS='-var name=test -var=region=us-east-1 -var tags={"env":"prod","team":"devops"}' Returns: map[string]any{"name": "test", "region": "us-east-1", "tags": map[string]any{"env": "prod", "team": "devops"}}.

func GetTerraformOutput added in v1.140.0

func GetTerraformOutput(
	atmosConfig *schema.AtmosConfiguration,
	stack string,
	component string,
	output string,
	skipCache bool,
	authContext *schema.AuthContext,
	authManager any,
) (any, bool, error)

GetTerraformOutput retrieves a specified Terraform output variable for a given component within a stack. It optionally uses a cache to avoid redundant state retrievals and supports both static and dynamic backends. Parameters:

  • atmosConfig: Atmos configuration pointer
  • stack: Stack identifier
  • component: Component identifier
  • output: Output variable key to retrieve
  • skipCache: Flag to bypass cache lookup
  • authContext: Authentication context for credential access (may be nil)
  • authManager: Optional auth manager for nested operations that need authentication

Returns:

  • value: The output value (may be nil if the output exists but has a null value)
  • exists: Whether the output key exists in the terraform outputs

GetTerraformOutput retrieves the named Terraform output for a specific component in a stack. It may return a cached result unless skipCache is true, and it will use the provided authManager (if non-nil) or an authContext-derived wrapper to resolve credentials for describing the component. If the component is configured to use a static remote state backend, the value is read from that static section instead of executing Terraform.

The function returns the output value, a boolean that is true when the output path exists (even if null), and an error if retrieval or evaluation failed.

func GetTerraformState added in v1.183.0

func GetTerraformState(
	atmosConfig *schema.AtmosConfiguration,
	yamlFunc string,
	stack string,
	component string,
	output string,
	skipCache bool,
	authContext *schema.AuthContext,
	authManager any,
) (any, error)

GetTerraformState retrieves a specified Terraform output variable for a given component within a stack. It optionally uses a cache to avoid redundant state retrievals and supports both static and dynamic backends. Parameters:

  • atmosConfig: Atmos configuration pointer
  • yamlFunc: Name of the calling YAML function for error context
  • stack: Stack identifier
  • component: Component identifier
  • output: Output variable key to retrieve
  • skipCache: Flag to bypass cache lookup
  • authContext: Optional auth context containing Atmos-managed credentials
  • authManager: Optional auth manager for nested operations that need authentication

Returns the output value or nil if the component is not provisioned.

func IsComponentAbstract added in v1.78.0

func IsComponentAbstract(metadataSection map[string]any) bool

IsComponentAbstract returns 'true' if the component is abstract.

func IsComponentEnabled added in v1.89.0

func IsComponentEnabled(varsSection map[string]any) bool

IsComponentEnabled returns 'true' if the component is enabled.

func IsGolangTemplate added in v1.81.0

func IsGolangTemplate(atmosConfig *schema.AtmosConfiguration, str string) (bool, error)

IsGolangTemplate checks if the provided string is a Go template.

func IsKnownWorkflowError added in v1.179.0

func IsKnownWorkflowError(err error) bool

IsKnownWorkflowError returns true if the error matches any known workflow error. This includes ExitCodeError which indicates a subcommand failure that's already been reported.

func IsOpenTofu added in v1.198.0

func IsOpenTofu(atmosConfig *schema.AtmosConfiguration) bool

IsOpenTofu detects whether the configured terraform command is OpenTofu or Terraform. It uses a two-tier detection strategy:

  1. Fast path: Check if the executable basename contains "tofu"
  2. Slow path: Execute the version command and check the output

Results are cached by command path to avoid repeated subprocess execution.

func IsValidDataDir added in v1.114.0

func IsValidDataDir(tfDataDir string) error

func NewAtmosValidatorExecutor added in v1.174.0

func NewAtmosValidatorExecutor(atmosConfig *schema.AtmosConfiguration) *atmosValidatorExecutor

func NewComponentYAMLProcessor added in v1.201.0

func NewComponentYAMLProcessor(
	atmosConfig *schema.AtmosConfiguration,
	currentStack string,
	skip []string,
	resolutionCtx *ResolutionContext,
	stackInfo *schema.ConfigAndStacksInfo,
) m.YAMLFunctionProcessor

NewComponentYAMLProcessor creates a new YAML processor for component merging.

func NewDescribeConfig added in v1.175.0

func NewDescribeConfig(atmosConfig *schema.AtmosConfiguration) *describeConfigExec

func NewSpinner added in v1.160.3

func NewSpinner(message string) *tea.Program

NewSpinner creates a tea.Program that displays an animated spinner with the provided message. It applies the current UI spinner style. If stdout lacks TTY support, the program is configured without a renderer and without input; a debug message is logged and the message is written to stderr as a fallback.

func NewVersionExec added in v1.165.2

func NewVersionExec(atmosConfig *schema.AtmosConfiguration) *versionExec

func ProcessBaseComponentConfig added in v1.81.0

func ProcessBaseComponentConfig(
	atmosConfig *schema.AtmosConfiguration,
	baseComponentConfig *schema.BaseComponentConfig,
	allComponentsMap map[string]any,
	component string,
	stack string,
	baseComponent string,
	componentBasePath string,
	checkBaseComponentExists bool,
	baseComponents *[]string,
) error

ProcessBaseComponentConfig processes base component(s) config.

func ProcessCommandLineArgs added in v1.119.0

func ProcessCommandLineArgs(
	componentType string,
	cmd *cobra.Command,
	args []string,
	additionalArgsAndFlags []string,
) (schema.ConfigAndStacksInfo, error)

ProcessCommandLineArgs processes command-line args.

func ProcessComponentConfig added in v1.66.0

func ProcessComponentConfig(
	atmosConfig *schema.AtmosConfiguration,
	configAndStacksInfo *schema.ConfigAndStacksInfo,
	stack string,
	stacksMap map[string]any,
	componentType string,
	component string,
	authManager auth.AuthManager,
) error

ProcessComponentConfig processes component config sections.

func ProcessComponentMetadata added in v1.8.0

func ProcessComponentMetadata(
	component string,
	componentSection map[string]any,
) (map[string]any, string, bool, bool, bool)

ProcessComponentMetadata processes component metadata and returns a base component (if any) and whether the component is real or abstract and whether the component is disabled or not and whether the component is locked.

func ProcessConfigSources added in v1.42.0

func ProcessConfigSources(
	configAndStacksInfo schema.ConfigAndStacksInfo,
	rawStackConfigs map[string]map[string]any,
) (schema.ConfigSources, error)

ProcessConfigSources processes the sources (files) for all sections for a component in a stack.

func ProcessCustomYamlTags added in v1.111.0

func ProcessCustomYamlTags(
	atmosConfig *schema.AtmosConfiguration,
	input schema.AtmosSectionMapType,
	currentStack string,
	skip []string,
	stackInfo *schema.ConfigAndStacksInfo,
) (schema.AtmosSectionMapType, error)

func ProcessCustomYamlTagsWithContext added in v1.196.0

func ProcessCustomYamlTagsWithContext(
	atmosConfig *schema.AtmosConfiguration,
	input schema.AtmosSectionMapType,
	currentStack string,
	skip []string,
	resolutionCtx *ResolutionContext,
	stackInfo *schema.ConfigAndStacksInfo,
) (schema.AtmosSectionMapType, error)

func ProcessImportSection added in v1.81.0

func ProcessImportSection(stackMap map[string]any, filePath string) ([]schema.StackImport, error)

ProcessImportSection processes the `import` section in stack manifests. The `import` section can contain: 1. Project-relative paths (e.g. "mixins/region/us-east-2") 2. Paths relative to the current stack file (e.g. "./_defaults") 3. StackImport structs containing either of the above path types (e.g. "path: mixins/region/us-east-2").

func ProcessStackConfig added in v1.81.0

func ProcessStackConfig(
	atmosConfig *schema.AtmosConfiguration,
	stacksBasePath string,
	terraformComponentsBasePath string,
	helmfileComponentsBasePath string,
	packerComponentsBasePath string,
	stack string,
	config map[string]any,
	processStackDeps bool,
	processComponentDeps bool,
	componentTypeFilter string,
	componentStackMap map[string]map[string][]string,
	importsConfig map[string]map[string]any,
	checkBaseComponentExists bool,
) (map[string]any, error)

ProcessStackConfig processes a stack configuration.

func ProcessStacks added in v1.3.28

func ProcessStacks(
	atmosConfig *schema.AtmosConfiguration,
	configAndStacksInfo schema.ConfigAndStacksInfo,
	checkStack bool,
	processTemplates bool,
	processYamlFunctions bool,
	skip []string,
	authManager auth.AuthManager,
) (schema.ConfigAndStacksInfo, error)

ProcessStacks processes stack config.

func ProcessTemplateTagsOnly added in v1.201.0

func ProcessTemplateTagsOnly(input map[string]any) map[string]any

ProcessTemplateTagsOnly processes only !template tags in a data structure, recursively. It is used before merging to ensure !template strings are decoded to their actual types. This avoids type conflicts during merge (e.g., string vs list).

func ProcessTmpl added in v1.81.0

func ProcessTmpl(
	atmosConfig *schema.AtmosConfiguration,
	tmplName string,
	tmplValue string,
	tmplData any,
	ignoreMissingTemplateValues bool,
) (string, error)

ProcessTmpl parses and executes Go templates.

func ProcessTmplWithDatasources added in v1.81.0

func ProcessTmplWithDatasources(
	atmosConfig *schema.AtmosConfiguration,
	configAndStacksInfo *schema.ConfigAndStacksInfo,
	settingsSection schema.Settings,
	tmplName string,
	tmplValue string,
	tmplData any,
	ignoreMissingTemplateValues bool,
) (string, error)

ProcessTmplWithDatasources parses and executes Go templates with datasources.

func ProcessTmplWithDatasourcesGomplate added in v1.175.0

func ProcessTmplWithDatasourcesGomplate(
	atmosConfig *schema.AtmosConfiguration,
	tmplName string,
	tmplValue string,
	mergedData map[string]interface{},
	ignoreMissingTemplateValues bool,
) (string, error)

ProcessTmplWithDatasourcesGomplate parses and executes Go templates with datasources using Gomplate.

func ProcessYAMLConfigFile added in v1.81.0

func ProcessYAMLConfigFile(
	atmosConfig *schema.AtmosConfiguration,
	basePath string,
	filePath string,
	importsConfig map[string]map[string]any,
	context map[string]any,
	ignoreMissingFiles bool,
	skipTemplatesProcessingInImports bool,
	ignoreMissingTemplateValues bool,
	skipIfMissing bool,
	parentTerraformOverridesInline map[string]any,
	parentTerraformOverridesImports map[string]any,
	parentHelmfileOverridesInline map[string]any,
	parentHelmfileOverridesImports map[string]any,
	atmosManifestJsonSchemaFilePath string,
) (
	map[string]any,
	map[string]map[string]any,
	map[string]any,
	map[string]any,
	map[string]any,
	map[string]any,
	map[string]any,
	error,
)

ProcessYAMLConfigFile takes a path to a YAML stack manifest, recursively processes and deep-merges all the imports, and returns the final stack config.

func ProcessYAMLConfigFileWithContext added in v1.191.0

func ProcessYAMLConfigFileWithContext(
	atmosConfig *schema.AtmosConfiguration,
	basePath string,
	filePath string,
	importsConfig map[string]map[string]any,
	context map[string]any,
	ignoreMissingFiles bool,
	skipTemplatesProcessingInImports bool,
	ignoreMissingTemplateValues bool,
	skipIfMissing bool,
	parentTerraformOverridesInline map[string]any,
	parentTerraformOverridesImports map[string]any,
	parentHelmfileOverridesInline map[string]any,
	parentHelmfileOverridesImports map[string]any,
	atmosManifestJsonSchemaFilePath string,
	mergeContext *m.MergeContext,
) (
	map[string]any,
	map[string]map[string]any,
	map[string]any,
	map[string]any,
	map[string]any,
	map[string]any,
	map[string]any,
	error,
)

ProcessYAMLConfigFileWithContext takes a path to a YAML stack manifest, recursively processes and deep-merges all the imports with context tracking, and returns the final stack config.

func ProcessYAMLConfigFiles added in v1.81.0

func ProcessYAMLConfigFiles(
	atmosConfig *schema.AtmosConfiguration,
	stacksBasePath string,
	terraformComponentsBasePath string,
	helmfileComponentsBasePath string,
	packerComponentsBasePath string,
	filePaths []string,
	processStackDeps bool,
	processComponentDeps bool,
	ignoreMissingFiles bool,
) (
	[]string,
	map[string]any,
	map[string]map[string]any,
	error,
)

ProcessYAMLConfigFiles takes a list of paths to stack manifests, processes and deep-merges all imports, and returns a list of stack configs.

func ReadAndProcessComponentVendorConfigFile added in v1.47.0

func ReadAndProcessComponentVendorConfigFile(
	atmosConfig *schema.AtmosConfiguration,
	component string,
	componentType string,
) (schema.VendorComponentConfig, string, error)

ReadAndProcessComponentVendorConfigFile reads and processes the component vendoring config file `component.yaml`.

func ReadAndProcessVendorConfigFile added in v1.47.0

func ReadAndProcessVendorConfigFile(
	atmosConfig *schema.AtmosConfiguration,
	vendorConfigFile string,
	checkGlobalConfig bool,
) (schema.AtmosVendorConfig, bool, string, error)

ReadAndProcessVendorConfigFile reads and processes the Atmos vendoring config file `vendor.yaml`.

func ResolveComponentFromPath added in v1.201.0

func ResolveComponentFromPath(
	atmosConfig *schema.AtmosConfiguration,
	path string,
	stack string,
	expectedComponentType string,
) (string, error)

ResolveComponentFromPath resolves a filesystem path to a component name and validates it exists in the stack. This is a wrapper around pkg/component.Resolver.ResolveComponentFromPath for backwards compatibility.

func ResolveComponentFromPathWithoutTypeCheck added in v1.201.0

func ResolveComponentFromPathWithoutTypeCheck(
	atmosConfig *schema.AtmosConfiguration,
	path string,
	stack string,
) (string, error)

ResolveComponentFromPathWithoutTypeCheck resolves a filesystem path to a component name without validating component type. This is a wrapper around pkg/component.Resolver.ResolveComponentFromPathWithoutTypeCheck for backwards compatibility.

func ResolveComponentFromPathWithoutValidation added in v1.201.0

func ResolveComponentFromPathWithoutValidation(
	atmosConfig *schema.AtmosConfiguration,
	path string,
	expectedComponentType string,
) (string, error)

ResolveComponentFromPathWithoutValidation resolves a filesystem path to a component name without stack validation. This is used during command-line argument parsing to extract the component name from a path. Stack validation happens later in ProcessStacks() to avoid duplicate work.

func RunSpinner added in v1.160.3

func RunSpinner(p *tea.Program, spinnerChan chan struct{}, message string)

RunSpinner executes the spinner program in a goroutine.

func SanitizeFileName added in v1.153.0

func SanitizeFileName(uri string) string

SanitizeFileName replaces invalid characters and query strings with underscores for Windows.

func SetAWSGetter added in v1.201.0

func SetAWSGetter(getter AWSGetter) func()

SetAWSGetter allows tests to inject a mock AWSGetter. Returns a function to restore the original getter.

func SetDescribeAffectedFlagValueInCliArgs added in v1.181.0

func SetDescribeAffectedFlagValueInCliArgs(flags *pflag.FlagSet, describe *DescribeAffectedCmdArgs)

SetDescribeAffectedFlagValueInCliArgs sets the flag values in CLI arguments.

func SetLastMergeContext added in v1.194.0

func SetLastMergeContext(ctx *m.MergeContext)

SetLastMergeContext stores the merge context for later retrieval. Deprecated: Use SetMergeContextForStack instead.

func SetMergeContextForStack added in v1.194.0

func SetMergeContextForStack(stackFile string, ctx *m.MergeContext)

SetMergeContextForStack stores the merge context for a specific stack file.

func StopSpinner added in v1.160.3

func StopSpinner(p *tea.Program, spinnerChan chan struct{})

StopSpinner stops the spinner program and waits for the completion.

func TerraformPlanDiff added in v1.166.0

func TerraformPlanDiff(atmosConfig *schema.AtmosConfiguration, info *schema.ConfigAndStacksInfo) error

TerraformPlanDiff represents the plan-diff command implementation.

func ValidateComponent added in v1.9.0

func ValidateComponent(
	atmosConfig *schema.AtmosConfiguration,
	componentName string,
	componentSection map[string]any,
	schemaPath string,
	schemaType string,
	modulePaths []string,
	timeoutSeconds int,
) (bool, error)

ValidateComponent validates the component config using JsonSchema or OPA schema documents.

func ValidateStacks added in v1.75.0

func ValidateStacks(atmosConfig *schema.AtmosConfiguration) error

ValidateStacks validates Atmos stack configuration.

func ValidateWithCue added in v1.9.0

func ValidateWithCue(data any, schemaName string, schemaText string) (bool, error)

ValidateWithCue validates the data structure using the provided CUE document. https://cuelang.org/docs/integrations/go/#processing-cue-in-go

func ValidateWithJsonSchema added in v1.9.0

func ValidateWithJsonSchema(data any, schemaName string, schemaText string) (bool, error)

ValidateWithJsonSchema validates the data structure using the provided JSON Schema document. https://github.com/santhosh-tekuri/jsonschema https://go.dev/play/p/Hhax3MrtD8r

func ValidateWithOpa added in v1.9.0

func ValidateWithOpa(
	data any,
	schemaPath string,
	modulePaths []string,
	timeoutSeconds int,
) (bool, error)

ValidateWithOpa validates the data structure using the provided OPA document. https://github.com/open-policy-agent/opa/blob/main/rego/example_test.go https://github.com/open-policy-agent/opa/blob/main/rego/rego_test.go https://www.openpolicyagent.org/docs/latest/integration/#sdk

func ValidateWithOpaLegacy added in v1.38.0

func ValidateWithOpaLegacy(
	data any,
	schemaName string,
	schemaText string,
	timeoutSeconds int,
) (bool, error)

ValidateWithOpaLegacy validates the data structure using the provided OPA document. https://www.openpolicyagent.org/docs/latest/integration/#sdk

Types

type AWSCallerIdentity added in v1.201.0

type AWSCallerIdentity struct {
	Account string
	Arn     string
	UserID  string
	Region  string // The AWS region from the loaded config.
}

AWSCallerIdentity holds the information returned by AWS STS GetCallerIdentity.

type AWSGetter added in v1.201.0

type AWSGetter interface {
	// GetCallerIdentity retrieves the AWS caller identity for the current credentials.
	// Returns the account ID, ARN, and user ID of the calling identity.
	GetCallerIdentity(
		ctx context.Context,
		atmosConfig *schema.AtmosConfiguration,
		authContext *schema.AWSAuthContext,
	) (*AWSCallerIdentity, error)
}

AWSGetter provides an interface for retrieving AWS caller identity information. This interface enables dependency injection and testability.

type AtmosFuncs added in v1.81.0

type AtmosFuncs struct {
	// contains filtered or unexported fields
}

AtmosFuncs exposes functions available in templates via the "atmos" namespace.

func (AtmosFuncs) Component added in v1.81.0

func (f AtmosFuncs) Component(component string, stack string) (any, error)

Component returns component configuration for the given component and stack.

func (AtmosFuncs) GomplateDatasource added in v1.84.0

func (f AtmosFuncs) GomplateDatasource(alias string, args ...string) (any, error)

GomplateDatasource returns data for a gomplate datasource alias.

func (AtmosFuncs) Store added in v1.171.0

func (f AtmosFuncs) Store(store string, stack string, component string, key string) (any, error)

Store reads a value from a named store for the given stack, component, and key.

type ComponentProcessorOptions added in v1.194.0

type ComponentProcessorOptions struct {
	ComponentType            string
	Component                string
	Stack                    string
	StackName                string
	ComponentMap             map[string]any
	AllComponentsMap         map[string]any
	ComponentsBasePath       string
	CheckBaseComponentExists bool

	// Global configurations.
	GlobalVars         map[string]any
	GlobalSettings     map[string]any
	GlobalEnv          map[string]any
	GlobalAuth         map[string]any
	GlobalCommand      string
	AtmosGlobalAuthMap map[string]any // Pre-converted atmosConfig.Auth to prevent race conditions

	// Terraform-specific options.
	TerraformProviders              map[string]any
	GlobalAndTerraformHooks         map[string]any
	GlobalBackendType               string
	GlobalBackendSection            map[string]any
	GlobalRemoteStateBackendType    string
	GlobalRemoteStateBackendSection map[string]any

	// Atmos configuration.
	AtmosConfig *schema.AtmosConfiguration
}

ComponentProcessorOptions contains configuration for processing a component.

type ComponentProcessorResult added in v1.194.0

type ComponentProcessorResult struct {
	ComponentVars              map[string]any
	ComponentSettings          map[string]any
	ComponentEnv               map[string]any
	ComponentMetadata          map[string]any
	ComponentCommand           string
	ComponentOverrides         map[string]any
	ComponentOverridesVars     map[string]any
	ComponentOverridesSettings map[string]any
	ComponentOverridesEnv      map[string]any
	ComponentOverridesAuth     map[string]any
	ComponentOverridesCommand  string
	BaseComponentName          string
	BaseComponentVars          map[string]any
	BaseComponentSettings      map[string]any
	BaseComponentEnv           map[string]any
	BaseComponentAuth          map[string]any
	BaseComponentMetadata      map[string]any
	BaseComponentCommand       string
	ComponentInheritanceChain  []string
	BaseComponents             []string

	// Terraform-specific fields.
	ComponentProviders                     map[string]any
	ComponentHooks                         map[string]any
	ComponentAuth                          map[string]any
	ComponentBackendType                   string
	ComponentBackendSection                map[string]any
	ComponentRemoteStateBackendType        string
	ComponentRemoteStateBackendSection     map[string]any
	ComponentOverridesProviders            map[string]any
	ComponentOverridesHooks                map[string]any
	BaseComponentProviders                 map[string]any
	BaseComponentHooks                     map[string]any
	BaseComponentBackendType               string
	BaseComponentBackendSection            map[string]any
	BaseComponentRemoteStateBackendType    string
	BaseComponentRemoteStateBackendSection map[string]any
}

ComponentProcessorResult contains the processed component data.

type ComponentSkipFunc added in v1.166.0

type ComponentSkipFunc func(os.FileInfo, string, string) (bool, error)

type ComponentYAMLProcessor added in v1.201.0

type ComponentYAMLProcessor struct {
	// contains filtered or unexported fields
}

ComponentYAMLProcessor processes YAML functions for a specific component. It implements the merge.YAMLFunctionProcessor interface.

func (*ComponentYAMLProcessor) ProcessYAMLFunctionString added in v1.201.0

func (p *ComponentYAMLProcessor) ProcessYAMLFunctionString(value string) (any, error)

ProcessYAMLFunctionString processes a YAML function string and returns the processed value. This method recursively processes the string to handle all YAML function types: - !template: Go template rendering - !terraform.output: Terraform output from other components - !terraform.state: Terraform state queries - !store.get, !store: Store lookups - !exec: Command execution - !env: Environment variable expansion.

type CopyContext added in v1.168.0

type CopyContext struct {
	SrcDir   string
	DstDir   string
	BaseDir  string
	Excluded []string
	Included []string
}

CopyContext groups parameters for directory copy operations.

type DefaultStacksProcessor added in v1.195.0

type DefaultStacksProcessor struct{}

DefaultStacksProcessor provides the default implementation of StacksProcessor.

func (*DefaultStacksProcessor) ExecuteDescribeStacks added in v1.195.0

func (d *DefaultStacksProcessor) ExecuteDescribeStacks(
	atmosConfig *schema.AtmosConfiguration,
	filterByStack string,
	components []string,
	componentTypes []string,
	sections []string,
	ignoreMissingFiles bool,
	processTemplates bool,
	processYamlFunctions bool,
	includeEmptyStacks bool,
	skip []string,
	authManager auth.AuthManager,
) (map[string]any, error)

ExecuteDescribeStacks delegates to the package-level ExecuteDescribeStacks function.

type DependencyNode added in v1.196.0

type DependencyNode struct {
	Component    string
	Stack        string
	FunctionType string // "terraform.state", "terraform.output", "atmos.Component"
	FunctionCall string // Full function call for error reporting
}

DependencyNode represents a single node in the dependency resolution chain.

type DescribeAffectedCmdArgs added in v1.87.0

type DescribeAffectedCmdArgs struct {
	CLIConfig                   *schema.AtmosConfiguration
	CloneTargetRef              bool
	Format                      string
	IncludeDependents           bool
	IncludeSettings             bool
	IncludeSpaceliftAdminStacks bool
	OutputFile                  string
	Ref                         string
	RepoPath                    string
	SHA                         string
	SSHKeyPath                  string
	SSHKeyPassword              string
	Verbose                     bool
	Upload                      bool
	Stack                       string
	Query                       string
	ProcessTemplates            bool
	ProcessYamlFunctions        bool
	Skip                        []string
	ExcludeLocked               bool
	AuthManager                 auth.AuthManager // Optional: Auth manager for credential management (from --identity flag).
}

func ParseDescribeAffectedCliArgs added in v1.181.0

func ParseDescribeAffectedCliArgs(cmd *cobra.Command, args []string) (DescribeAffectedCmdArgs, error)

ParseDescribeAffectedCliArgs parses the command-line arguments of the `atmos describe affected` command.

type DescribeAffectedExec added in v1.179.0

type DescribeAffectedExec interface {
	Execute(*DescribeAffectedCmdArgs) error
}

func NewDescribeAffectedExec added in v1.179.0

func NewDescribeAffectedExec(
	atmosConfig *schema.AtmosConfiguration,
) DescribeAffectedExec

NewDescribeAffectedExec creates a new `describe affected` executor.

type DescribeAffectedExecCreator added in v1.181.0

type DescribeAffectedExecCreator func(atmosConfig *schema.AtmosConfiguration) DescribeAffectedExec

type DescribeComponentContextParams added in v1.194.0

type DescribeComponentContextParams struct {
	AtmosConfig          *schema.AtmosConfiguration
	Component            string
	Stack                string
	ProcessTemplates     bool
	ProcessYamlFunctions bool
	Skip                 []string
	AuthManager          auth.AuthManager // Optional: Auth manager for credential management
}

DescribeComponentContextParams contains parameters for describing a component with context.

type DescribeComponentExec added in v1.176.0

type DescribeComponentExec struct {
	IsTTYSupportForStdout func() bool
	// contains filtered or unexported fields
}

func NewDescribeComponentExec added in v1.176.0

func NewDescribeComponentExec() *DescribeComponentExec

func (*DescribeComponentExec) ExecuteDescribeComponentCmd added in v1.176.0

func (d *DescribeComponentExec) ExecuteDescribeComponentCmd(describeComponentParams DescribeComponentParams) error

type DescribeComponentParams added in v1.176.0

type DescribeComponentParams struct {
	Component            string
	Stack                string
	ProcessTemplates     bool
	ProcessYamlFunctions bool
	Skip                 []string
	Query                string
	Format               string
	File                 string
	Provenance           bool
	AuthManager          auth.AuthManager // Optional: Auth manager for credential management (from --identity flag).
}

type DescribeComponentResult added in v1.194.0

type DescribeComponentResult struct {
	ComponentSection map[string]any
	MergeContext     *m.MergeContext
	StackFile        string // The stack manifest file being described
}

DescribeComponentResult contains the result of describing a component.

func ExecuteDescribeComponentWithContext added in v1.194.0

func ExecuteDescribeComponentWithContext(params DescribeComponentContextParams) (*DescribeComponentResult, error)

ExecuteDescribeComponentWithContext describes component config and returns the merge context.

type DescribeConfigFormatError added in v1.175.0

type DescribeConfigFormatError struct {
	// contains filtered or unexported fields
}

func (DescribeConfigFormatError) Error added in v1.175.0

type DescribeDependentsArgs added in v1.196.0

type DescribeDependentsArgs struct {
	Component            string
	Stack                string
	IncludeSettings      bool
	ProcessTemplates     bool
	ProcessYamlFunctions bool
	Skip                 []string
	OnlyInStack          string
	AuthManager          auth.AuthManager // Optional: Auth manager for credential management (from --identity flag).
}

DescribeDependentsArgs holds arguments for ExecuteDescribeDependents.

type DescribeDependentsExec added in v1.182.0

type DescribeDependentsExec interface {
	Execute(describeDependentsExecProps *DescribeDependentsExecProps) error
}

func NewDescribeDependentsExec added in v1.182.0

func NewDescribeDependentsExec(atmosConfig *schema.AtmosConfiguration) DescribeDependentsExec

NewDescribeDependentsExec creates a new `describe dependents` executor.

type DescribeDependentsExecProps added in v1.182.0

type DescribeDependentsExecProps struct {
	File                 string
	Format               string
	Query                string
	Stack                string
	Component            string
	IncludeSettings      bool
	ProcessTemplates     bool
	ProcessYamlFunctions bool
	Skip                 []string
	AuthManager          auth.AuthManager // Optional: Auth manager for credential management (from --identity flag).
}

type DescribeStacksArgs added in v1.179.0

type DescribeStacksArgs struct {
	Query                string
	FilterByStack        string
	Components           []string
	ComponentTypes       []string
	Sections             []string
	IgnoreMissingFiles   bool
	ProcessTemplates     bool
	ProcessYamlFunctions bool
	IncludeEmptyStacks   bool
	Skip                 []string
	Format               string
	File                 string
	AuthManager          auth.AuthManager // Optional: Auth manager for credential management (from --identity flag).
}

type DescribeStacksExec added in v1.179.0

type DescribeStacksExec interface {
	Execute(atmosConfig *schema.AtmosConfiguration, args *DescribeStacksArgs) error
}

func NewDescribeStacksExec added in v1.179.0

func NewDescribeStacksExec() DescribeStacksExec

type DescribeWorkflowsArgs added in v1.181.0

type DescribeWorkflowsArgs struct {
	Format     string
	OutputType string
	Query      string
}

type DescribeWorkflowsExec added in v1.181.0

type DescribeWorkflowsExec interface {
	Execute(*schema.AtmosConfiguration, *DescribeWorkflowsArgs) error
}

func NewDescribeWorkflowsExec added in v1.181.0

func NewDescribeWorkflowsExec() DescribeWorkflowsExec

type Directory added in v1.114.0

type Directory struct {
	Name         string
	FullPath     string
	RelativePath string
	Files        []ObjectInfo
}

func CollectComponentObjects added in v1.174.0

func CollectComponentObjects(terraformDirAbsolutePath string, componentPath string, patterns []string) ([]Directory, error)

func CollectComponentsDirectoryObjects added in v1.174.0

func CollectComponentsDirectoryObjects(terraformDirAbsolutePath string, allComponentsRelativePaths []string, filesToClear []string) ([]Directory, error)

func CollectDirectoryObjects added in v1.114.0

func CollectDirectoryObjects(basePath string, patterns []string) ([]Directory, error)

type ErrInvalidPattern added in v1.174.0

type ErrInvalidPattern struct {
	Pattern string
	// contains filtered or unexported fields
}

func (ErrInvalidPattern) Error added in v1.174.0

func (e ErrInvalidPattern) Error() string

type ExecStackLoader added in v1.201.0

type ExecStackLoader struct{}

ExecStackLoader implements the component.StackLoader interface. This allows internal/exec to provide stack loading functionality to pkg/component. This avoids a circular dependency.

func NewStackLoader added in v1.201.0

func NewStackLoader() *ExecStackLoader

NewStackLoader creates a new stack loader.

func (*ExecStackLoader) FindStacksMap added in v1.201.0

func (l *ExecStackLoader) FindStacksMap(atmosConfig *schema.AtmosConfiguration, ignoreMissingFiles bool) (
	map[string]any,
	map[string]map[string]any,
	error,
)

FindStacksMap implements component.StackLoader. This returns stacks keyed by their LOGICAL names (based on name_pattern/name_template) not by their manifest file names. This is important for component resolution since users specify stacks by logical name (e.g., "test") not by file name (e.g., "test-stack").

type ExecuteDescribeComponentParams added in v1.197.0

type ExecuteDescribeComponentParams struct {
	Component            string
	Stack                string
	ProcessTemplates     bool
	ProcessYamlFunctions bool
	Skip                 []string
	AuthManager          auth.AuthManager
}

ExecuteDescribeComponentParams contains parameters for ExecuteDescribeComponent.

type FileCopier added in v1.194.0

type FileCopier struct {
	// contains filtered or unexported fields
}

FileCopier provides file copying operations with injectable dependencies for testing.

func NewFileCopier added in v1.194.0

func NewFileCopier(fs filesystem.FileSystem, glob filesystem.GlobMatcher, ioCopy filesystem.IOCopier) *FileCopier

NewFileCopier creates a new FileCopier with the given dependencies.

type Formatter added in v1.175.0

type Formatter interface {
	Generate(module *tfdocsTf.Module) error
	Content() string
}

type MockDescribeAffectedExec added in v1.179.0

type MockDescribeAffectedExec struct {
	// contains filtered or unexported fields
}

MockDescribeAffectedExec is a mock of DescribeAffectedExec interface.

func NewMockDescribeAffectedExec added in v1.179.0

func NewMockDescribeAffectedExec(ctrl *gomock.Controller) *MockDescribeAffectedExec

NewMockDescribeAffectedExec creates a new mock instance.

func (*MockDescribeAffectedExec) EXPECT added in v1.179.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockDescribeAffectedExec) Execute added in v1.179.0

Execute mocks base method.

type MockDescribeAffectedExecMockRecorder added in v1.179.0

type MockDescribeAffectedExecMockRecorder struct {
	// contains filtered or unexported fields
}

MockDescribeAffectedExecMockRecorder is the mock recorder for MockDescribeAffectedExec.

func (*MockDescribeAffectedExecMockRecorder) Execute added in v1.179.0

Execute indicates an expected call of Execute.

type MockDescribeDependentsExec added in v1.182.0

type MockDescribeDependentsExec struct {
	// contains filtered or unexported fields
}

MockDescribeDependentsExec is a mock of DescribeDependentsExec interface.

func NewMockDescribeDependentsExec added in v1.182.0

func NewMockDescribeDependentsExec(ctrl *gomock.Controller) *MockDescribeDependentsExec

NewMockDescribeDependentsExec creates a new mock instance.

func (*MockDescribeDependentsExec) EXPECT added in v1.182.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockDescribeDependentsExec) Execute added in v1.182.0

func (m *MockDescribeDependentsExec) Execute(describeDependentsExecProps *DescribeDependentsExecProps) error

Execute mocks base method.

type MockDescribeDependentsExecMockRecorder added in v1.182.0

type MockDescribeDependentsExecMockRecorder struct {
	// contains filtered or unexported fields
}

MockDescribeDependentsExecMockRecorder is the mock recorder for MockDescribeDependentsExec.

func (*MockDescribeDependentsExecMockRecorder) Execute added in v1.182.0

func (mr *MockDescribeDependentsExecMockRecorder) Execute(describeDependentsExecProps any) *gomock.Call

Execute indicates an expected call of Execute.

type MockDescribeStacksExec added in v1.179.0

type MockDescribeStacksExec struct {
	// contains filtered or unexported fields
}

MockDescribeStacksExec is a mock of DescribeStacksExec interface.

func NewMockDescribeStacksExec added in v1.179.0

func NewMockDescribeStacksExec(ctrl *gomock.Controller) *MockDescribeStacksExec

NewMockDescribeStacksExec creates a new mock instance.

func (*MockDescribeStacksExec) EXPECT added in v1.179.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockDescribeStacksExec) Execute added in v1.179.0

Execute mocks base method.

type MockDescribeStacksExecMockRecorder added in v1.179.0

type MockDescribeStacksExecMockRecorder struct {
	// contains filtered or unexported fields
}

MockDescribeStacksExecMockRecorder is the mock recorder for MockDescribeStacksExec.

func (*MockDescribeStacksExecMockRecorder) Execute added in v1.179.0

func (mr *MockDescribeStacksExecMockRecorder) Execute(atmosConfig, args any) *gomock.Call

Execute indicates an expected call of Execute.

type MockDescribeWorkflowsExec added in v1.181.0

type MockDescribeWorkflowsExec struct {
	// contains filtered or unexported fields
}

MockDescribeWorkflowsExec is a mock of DescribeWorkflowsExec interface.

func NewMockDescribeWorkflowsExec added in v1.181.0

func NewMockDescribeWorkflowsExec(ctrl *gomock.Controller) *MockDescribeWorkflowsExec

NewMockDescribeWorkflowsExec creates a new mock instance.

func (*MockDescribeWorkflowsExec) EXPECT added in v1.181.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockDescribeWorkflowsExec) Execute added in v1.181.0

Execute mocks base method.

type MockDescribeWorkflowsExecMockRecorder added in v1.181.0

type MockDescribeWorkflowsExecMockRecorder struct {
	// contains filtered or unexported fields
}

MockDescribeWorkflowsExecMockRecorder is the mock recorder for MockDescribeWorkflowsExec.

func (*MockDescribeWorkflowsExecMockRecorder) Execute added in v1.181.0

func (mr *MockDescribeWorkflowsExecMockRecorder) Execute(arg0, arg1 any) *gomock.Call

Execute indicates an expected call of Execute.

type MockStacksProcessor added in v1.195.0

type MockStacksProcessor struct {
	// contains filtered or unexported fields
}

MockStacksProcessor is a mock of StacksProcessor interface.

func NewMockStacksProcessor added in v1.195.0

func NewMockStacksProcessor(ctrl *gomock.Controller) *MockStacksProcessor

NewMockStacksProcessor creates a new mock instance.

func (*MockStacksProcessor) EXPECT added in v1.195.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockStacksProcessor) ExecuteDescribeStacks added in v1.195.0

func (m *MockStacksProcessor) ExecuteDescribeStacks(atmosConfig *schema.AtmosConfiguration, filterByStack string, components, componentTypes, sections []string, ignoreMissingFiles, processTemplates, processYamlFunctions, includeEmptyStacks bool, skip []string, authManager auth.AuthManager) (map[string]any, error)

ExecuteDescribeStacks mocks base method.

type MockStacksProcessorMockRecorder added in v1.195.0

type MockStacksProcessorMockRecorder struct {
	// contains filtered or unexported fields
}

MockStacksProcessorMockRecorder is the mock recorder for MockStacksProcessor.

func (*MockStacksProcessorMockRecorder) ExecuteDescribeStacks added in v1.195.0

func (mr *MockStacksProcessorMockRecorder) ExecuteDescribeStacks(atmosConfig, filterByStack, components, componentTypes, sections, ignoreMissingFiles, processTemplates, processYamlFunctions, includeEmptyStacks, skip, authManager any) *gomock.Call

ExecuteDescribeStacks indicates an expected call of ExecuteDescribeStacks.

type MockTerraformOutputGetter added in v1.196.0

type MockTerraformOutputGetter struct {
	// contains filtered or unexported fields
}

MockTerraformOutputGetter is a mock of TerraformOutputGetter interface.

func NewMockTerraformOutputGetter added in v1.196.0

func NewMockTerraformOutputGetter(ctrl *gomock.Controller) *MockTerraformOutputGetter

NewMockTerraformOutputGetter creates a new mock instance.

func (*MockTerraformOutputGetter) EXPECT added in v1.196.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockTerraformOutputGetter) GetOutput added in v1.196.0

func (m *MockTerraformOutputGetter) GetOutput(atmosConfig *schema.AtmosConfiguration, stack, component, output string, skipCache bool, authContext *schema.AuthContext, authManager any) (any, bool, error)

GetOutput mocks base method.

type MockTerraformOutputGetterMockRecorder added in v1.196.0

type MockTerraformOutputGetterMockRecorder struct {
	// contains filtered or unexported fields
}

MockTerraformOutputGetterMockRecorder is the mock recorder for MockTerraformOutputGetter.

func (*MockTerraformOutputGetterMockRecorder) GetOutput added in v1.196.0

func (mr *MockTerraformOutputGetterMockRecorder) GetOutput(atmosConfig, stack, component, output, skipCache, authContext, authManager any) *gomock.Call

GetOutput indicates an expected call of GetOutput.

type MockTerraformStateGetter added in v1.196.0

type MockTerraformStateGetter struct {
	// contains filtered or unexported fields
}

MockTerraformStateGetter is a mock of TerraformStateGetter interface.

func NewMockTerraformStateGetter added in v1.196.0

func NewMockTerraformStateGetter(ctrl *gomock.Controller) *MockTerraformStateGetter

NewMockTerraformStateGetter creates a new mock instance.

func (*MockTerraformStateGetter) EXPECT added in v1.196.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockTerraformStateGetter) GetState added in v1.196.0

func (m *MockTerraformStateGetter) GetState(atmosConfig *schema.AtmosConfiguration, yamlFunc, stack, component, output string, skipCache bool, authContext *schema.AuthContext, authManager any) (any, error)

GetState mocks base method.

type MockTerraformStateGetterMockRecorder added in v1.196.0

type MockTerraformStateGetterMockRecorder struct {
	// contains filtered or unexported fields
}

MockTerraformStateGetterMockRecorder is the mock recorder for MockTerraformStateGetter.

func (*MockTerraformStateGetterMockRecorder) GetState added in v1.196.0

func (mr *MockTerraformStateGetterMockRecorder) GetState(atmosConfig, yamlFunc, stack, component, output, skipCache, authContext, authManager any) *gomock.Call

GetState indicates an expected call of GetState.

type ObjectInfo added in v1.114.0

type ObjectInfo struct {
	FullPath     string
	RelativePath string
	Name         string
	IsDir        bool
}

type PackerFlags added in v1.186.0

type PackerFlags struct {
	Template string
	Query    string
}

PackerFlags type represents Packer command-line flags.

type PlanFileOptions added in v1.166.0

type PlanFileOptions struct {
	ComponentPath string
	OrigPlanFile  string
	NewPlanFile   string
	TmpDir        string
}

PlanFileOptions contains parameters for plan file operations.

type PlanfileOptions added in v1.172.0

type PlanfileOptions struct {
	Component            string
	Stack                string
	Format               string
	File                 string
	ProcessTemplates     bool
	ProcessYamlFunctions bool
	Skip                 []string
}

PlanfileOptions holds the options for generating a Terraform planfile.

type PrefixCopyContext added in v1.168.0

type PrefixCopyContext struct {
	SrcDir     string
	DstDir     string
	GlobalBase string
	Prefix     string
	Excluded   []string
}

PrefixCopyContext groups parameters for prefix-based copy operations.

type ProLockCmdArgs added in v1.87.0

type ProLockCmdArgs struct {
	ProLockUnlockCmdArgs
	LockMessage string
	LockTTL     int32
}

type ProLockUnlockCmdArgs added in v1.87.0

type ProLockUnlockCmdArgs struct {
	Component   string
	Stack       string
	AtmosConfig schema.AtmosConfiguration
}

type ProUnlockCmdArgs added in v1.87.0

type ProUnlockCmdArgs struct {
	ProLockUnlockCmdArgs
}

type ResolutionContext added in v1.196.0

type ResolutionContext struct {
	CallStack []DependencyNode
	Visited   map[string]bool // Map of "stack-component" to track visited nodes
}

ResolutionContext tracks the call stack during YAML function resolution to detect circular dependencies.

func GetOrCreateResolutionContext added in v1.196.0

func GetOrCreateResolutionContext() *ResolutionContext

GetOrCreateResolutionContext gets or creates a resolution context for the current goroutine.

func NewResolutionContext added in v1.196.0

func NewResolutionContext() *ResolutionContext

NewResolutionContext creates a new resolution context for cycle detection.

func (*ResolutionContext) Clone added in v1.196.0

func (ctx *ResolutionContext) Clone() *ResolutionContext

Clone creates a copy of the resolution context for use in concurrent operations.

func (*ResolutionContext) Pop added in v1.196.0

func (ctx *ResolutionContext) Pop(atmosConfig *schema.AtmosConfiguration)

Pop removes the top node from the call stack.

func (*ResolutionContext) Push added in v1.196.0

func (ctx *ResolutionContext) Push(atmosConfig *schema.AtmosConfiguration, node DependencyNode) error

Push adds a node to the call stack and checks for circular dependencies.

type SectionFilter added in v1.176.0

type SectionFilter interface {
	Filter(data map[string]any) map[string]any
}

SectionFilter defines the interface for filtering map sections.

type StacksProcessor added in v1.195.0

type StacksProcessor interface {
	// ExecuteDescribeStacks processes stack manifests and returns the final map of stacks and components.
	ExecuteDescribeStacks(
		atmosConfig *schema.AtmosConfiguration,
		filterByStack string,
		components []string,
		componentTypes []string,
		sections []string,
		ignoreMissingFiles bool,
		processTemplates bool,
		processYamlFunctions bool,
		includeEmptyStacks bool,
		skip []string,
		authManager auth.AuthManager,
	) (map[string]any, error)
}

StacksProcessor defines operations for processing stack manifests.

type TemplateRenderer added in v1.175.0

type TemplateRenderer interface {
	Render(tmplName, tmplValue string, mergedData map[string]interface{}, ignoreMissing bool) (string, error)
}

TemplateRenderer is an interface for rendering templates.

type TerraformDocsRunner added in v1.194.0

type TerraformDocsRunner interface {
	Run(dir string, settings *schema.TerraformDocsReadmeSettings) (string, error)
}

TerraformDocsRunner defines an interface for running terraform-docs.

type TerraformOutputGetter added in v1.196.0

type TerraformOutputGetter interface {
	// GetOutput retrieves terraform output for a component.
	// Note: High parameter count matches GetTerraformOutput signature.
	GetOutput(
		atmosConfig *schema.AtmosConfiguration,
		stack string,
		component string,
		output string,
		skipCache bool,
		authContext *schema.AuthContext,
		authManager any,
	) (any, bool, error)
}

TerraformOutputGetter defines the interface for getting terraform output. This interface allows for dependency injection and testing.

type TerraformStateGetter added in v1.196.0

type TerraformStateGetter interface {
	// GetState retrieves terraform state for a component.
	// Note: High parameter count matches GetTerraformState signature.
	GetState(
		atmosConfig *schema.AtmosConfiguration,
		yamlFunc string,
		stack string,
		component string,
		output string,
		skipCache bool,
		authContext *schema.AuthContext,
		authManager any,
	) (any, error)
}

TerraformStateGetter defines the interface for getting terraform state. This interface allows for dependency injection and testing.

type VendorFlags added in v1.166.0

type VendorFlags struct {
	DryRun        bool
	Component     string
	Stack         string
	Tags          []string
	Everything    bool
	ComponentType string
}

type Version added in v1.182.0

type Version struct {
	Version       string `json:"version" yaml:"version"`
	OS            string `json:"os" yaml:"os"`
	Arch          string `json:"arch" yaml:"arch"`
	UpdateVersion string `json:"update_version,omitempty" yaml:"update_version,omitempty"`
}

type WorkflowAuthProvider added in v1.201.0

type WorkflowAuthProvider struct {
	// contains filtered or unexported fields
}

WorkflowAuthProvider implements workflow.AuthProvider using auth.AuthManager.

func NewWorkflowAuthProvider added in v1.201.0

func NewWorkflowAuthProvider(manager auth.AuthManager) *WorkflowAuthProvider

NewWorkflowAuthProvider creates a new WorkflowAuthProvider with the given auth manager.

func (*WorkflowAuthProvider) Authenticate added in v1.201.0

func (p *WorkflowAuthProvider) Authenticate(ctx context.Context, identity string) error

Authenticate performs authentication for the given identity.

func (*WorkflowAuthProvider) GetCachedCredentials added in v1.201.0

func (p *WorkflowAuthProvider) GetCachedCredentials(ctx context.Context, identity string) (any, error)

GetCachedCredentials returns cached credentials for the identity.

func (*WorkflowAuthProvider) NeedsAuth added in v1.201.0

func (p *WorkflowAuthProvider) NeedsAuth(steps []schema.WorkflowStep, commandLineIdentity string) bool

NeedsAuth returns true if authentication is needed for the given steps.

func (*WorkflowAuthProvider) PrepareEnvironment added in v1.201.0

func (p *WorkflowAuthProvider) PrepareEnvironment(ctx context.Context, identity string, baseEnv []string) ([]string, error)

PrepareEnvironment prepares environment variables for the authenticated identity.

type WorkflowCommandRunner added in v1.201.0

type WorkflowCommandRunner struct{}

WorkflowCommandRunner implements workflow.CommandRunner using existing exec functions.

func NewWorkflowCommandRunner added in v1.201.0

func NewWorkflowCommandRunner(_ *schema.RetryConfig) *WorkflowCommandRunner

NewWorkflowCommandRunner creates a new WorkflowCommandRunner. Note: Retry logic should be handled at a higher level if needed.

func (*WorkflowCommandRunner) RunAtmos added in v1.201.0

func (r *WorkflowCommandRunner) RunAtmos(params *workflow.AtmosExecParams) error

RunAtmos executes an atmos command using ExecuteShellCommand. Note: Retry logic should be handled at a higher level if needed.

func (*WorkflowCommandRunner) RunShell added in v1.201.0

func (r *WorkflowCommandRunner) RunShell(command, name, dir string, env []string, dryRun bool) error

RunShell executes a shell command using ExecuteShell.

type WorkflowUIProvider added in v1.201.0

type WorkflowUIProvider struct{}

WorkflowUIProvider implements workflow.UIProvider using TUI utilities.

func NewWorkflowUIProvider added in v1.201.0

func NewWorkflowUIProvider() *WorkflowUIProvider

NewWorkflowUIProvider creates a new WorkflowUIProvider.

func (*WorkflowUIProvider) PrintError added in v1.201.0

func (p *WorkflowUIProvider) PrintError(err error, title, explanation string)

PrintError prints an error using the error utilities.

func (*WorkflowUIProvider) PrintMessage added in v1.201.0

func (p *WorkflowUIProvider) PrintMessage(format string, args ...any)

PrintMessage prints a message to the TUI.

Source Files

Jump to

Keyboard shortcuts

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