tag

package
v1.223.0-rc.8 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package tag provides YAML tag constants and validation for Atmos functions. This package is intentionally minimal and dependency-free to avoid import cycles when used from pkg/utils.

Index

Constants

View Source
const (
	// Exec executes a shell command and returns the output.
	Exec = "exec"

	// Secret resolves a declared secret from its configured backend.
	Secret = "secret"

	// Store retrieves a value from a configured store.
	Store = "store"

	// StoreGet retrieves a value from a configured store (alternative syntax).
	StoreGet = "store.get"

	// Template processes a JSON template.
	Template = "template"

	// TerraformOutput retrieves a Terraform output value.
	TerraformOutput = "terraform.output"

	// TerraformState retrieves a value from Terraform state.
	TerraformState = "terraform.state"

	// Env retrieves an environment variable value.
	Env = "env"

	// CEL evaluates a Common Expression Language condition.
	CEL = "cel"

	// Include includes content from another file.
	Include = "include"

	// IncludeRaw includes raw content from another file.
	IncludeRaw = "include.raw"

	// RepoRoot returns the git repository root path.
	RepoRoot = "repo-root"

	// GitRoot returns the git repository root path.
	GitRoot = "git.root"

	// GitSha returns the current Git HEAD commit SHA.
	GitSha = "git.sha"

	// GitBranch returns the current Git branch name.
	GitBranch = "git.branch"

	// GitRef returns the immutable Git ref used for source pinning.
	GitRef = "git.ref"

	// GitRepository returns the repository owner/name slug.
	GitRepository = "git.repository"

	// GitOwner returns the repository owner.
	GitOwner = "git.owner"

	// GitName returns the repository name.
	GitName = "git.name"

	// GitHost returns the repository host.
	GitHost = "git.host"

	// GitURL returns the repository URL.
	GitURL = "git.url"

	// Append appends list items during stack merging.
	Append = "append"

	// Cwd returns the current working directory.
	Cwd = "cwd"

	// Unset removes a value during configuration processing.
	Unset = "unset"

	// Random generates a random number.
	Random = "random"

	// Literal preserves values exactly as written, bypassing template processing.
	Literal = "literal"

	// AwsAccountID returns the AWS account ID.
	AwsAccountID = "aws.account_id"

	// AwsCallerIdentityArn returns the AWS caller identity ARN.
	AwsCallerIdentityArn = "aws.caller_identity_arn"

	// AwsCallerIdentityUserID returns the AWS caller identity user ID.
	AwsCallerIdentityUserID = "aws.caller_identity_user_id"

	// AwsRegion returns the AWS region.
	AwsRegion = "aws.region"

	// AwsOrganizationID returns the AWS Organization ID.
	AwsOrganizationID = "aws.organization_id"

	// Emulator resolves a value from a local emulator.
	Emulator = "emulator"

	// Version resolves a locked version from the Atmos Version Tracker.
	Version = "version"
)

Tag constants for Atmos configuration functions. These are the canonical function names used across all formats. In YAML they appear as !tag, in HCL as tag(), etc.

View Source
const YAMLPrefix = "!"

YAMLPrefix is the prefix used for YAML custom tags.

Variables

This section is empty.

Functions

func All

func All() []string

All returns all registered tag names without the YAML prefix.

func AllYAML

func AllYAML() []string

AllYAML returns all registered tag names with the YAML prefix (e.g., "!env", "!exec"). This is useful for error messages that need to show supported YAML tags.

func AtmosConfigYAML

func AtmosConfigYAML() []string

AtmosConfigYAML returns the YAML tags supported while preprocessing atmos.yaml. Some registered YAML functions require stack/component context and are resolved later by the stack YAML processor, so they are intentionally excluded here.

func FromYAML

func FromYAML(yamlTag string) string

FromYAML extracts the function name from a YAML tag (e.g., "!env" -> "env").

func IsAtmosConfigYAML

func IsAtmosConfigYAML(yamlTag string) bool

IsAtmosConfigYAML checks if a YAML tag is supported by atmos.yaml preprocessing.

func IsValid

func IsValid(name string) bool

IsValid checks if a tag name is registered. The name should not include the YAML prefix.

func IsValidYAML

func IsValidYAML(yamlTag string) bool

IsValidYAML checks if a YAML tag is registered. The tag should include the YAML prefix.

func ToYAML

func ToYAML(name string) string

ToYAML returns the YAML tag format for a function name (e.g., "env" -> "!env").

Types

This section is empty.

Jump to

Keyboard shortcuts

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