Documentation ¶
Index ¶
- Constants
- Variables
- func FindAllStackConfigsInPaths(cliConfig schema.CliConfiguration, includeStackPaths []string, ...) ([]string, []string, error)
- func FindAllStackConfigsInPathsForStack(cliConfig schema.CliConfiguration, stack string, includeStackPaths []string, ...) ([]string, []string, bool, error)
- func GetContextFromVars(vars map[any]any) schema.Context
- func GetContextPrefix(stack string, context schema.Context, stackNamePattern string, ...) (string, error)
- func GetStackNameFromContextAndStackNamePattern(namespace string, tenant string, environment string, stage string, ...) (string, error)
- func InitCliConfig(configAndStacksInfo schema.ConfigAndStacksInfo, processStacks bool) (schema.CliConfiguration, error)
- func ReplaceContextTokens(context schema.Context, pattern string) string
Constants ¶
const ( DefaultStackConfigFileExtension = ".yaml" DefaultVendoringManifestFileExtension = ".yaml" CliConfigFileName = "atmos.yaml" SystemDirConfigFilePath = "/usr/local/etc/atmos" WindowsAppDataEnvVar = "LOCALAPPDATA" // GlobalOptionsFlag is a custom flag to specify helmfile `GLOBAL OPTIONS` // https://github.com/roboll/helmfile#cli-reference GlobalOptionsFlag = "--global-options" TerraformCommandFlag = "--terraform-command" TerraformDirFlag = "--terraform-dir" HelmfileCommandFlag = "--helmfile-command" HelmfileDirFlag = "--helmfile-dir" CliConfigDirFlag = "--config-dir" StackDirFlag = "--stacks-dir" BasePathFlag = "--base-path" WorkflowDirFlag = "--workflows-dir" KubeConfigConfigFlag = "--kubeconfig-path" JsonSchemaDirFlag = "--schemas-jsonschema-dir" OpaDirFlag = "--schemas-opa-dir" CueDirFlag = "--schemas-cue-dir" AtmosManifestJsonSchemaFlag = "--schemas-atmos-manifest" DeployRunInitFlag = "--deploy-run-init" AutoGenerateBackendFileFlag = "--auto-generate-backend-file" InitRunReconfigure = "--init-run-reconfigure" FromPlanFlag = "--from-plan" PlanFileFlag = "--planfile" DryRunFlag = "--dry-run" SkipInitFlag = "--skip-init" RedirectStdErrFlag = "--redirect-stderr" HelpFlag1 = "-h" HelpFlag2 = "--help" ComponentVendorConfigFileName = "component.yaml" AtmosVendorConfigFileName = "vendor.yaml" ImportSectionName = "import" OverridesSectionName = "overrides" ProvidersSectionName = "providers" VarsSectionName = "vars" SettingsSectionName = "settings" EnvSectionName = "env" BackendSectionName = "backend" BackendTypeSectionName = "backend_type" MetadataSectionName = "metadata" ComponentSectionName = "component" ComponentsSectionName = "components" CommandSectionName = "command" TerraformSectionName = "terraform" HelmfileSectionName = "helmfile" LogsLevelFlag = "--logs-level" LogsFileFlag = "--logs-file" SettingsListMergeStrategyFlag = "--settings-list-merge-strategy" // Atmos Pro AtmosProBaseUrlEnvVarName = "ATMOS_PRO_BASE_URL" AtmosProEndpointEnvVarName = "ATMOS_PRO_ENDPOINT" AtmosProTokenEnvVarName = "ATMOS_PRO_TOKEN" AtmosProDefaultBaseUrl = "https://app.cloudposse.com" AtmosProDefaultEndpoint = "api" )
Variables ¶
var (
NotFound = errors.New("\n'atmos.yaml' CLI config was not found in any of the searched paths: system dir, home dir, current dir, ENV vars." +
"\nYou can download a sample config and adapt it to your requirements from " +
"https://raw.githubusercontent.com/cloudposse/atmos/main/examples/quick-start-advanced/atmos.yaml")
)
Functions ¶
func FindAllStackConfigsInPaths ¶ added in v1.4.13
func FindAllStackConfigsInPaths( cliConfig schema.CliConfiguration, includeStackPaths []string, excludeStackPaths []string, ) ([]string, []string, error)
FindAllStackConfigsInPaths finds all stack manifests in the paths specified by globs
func FindAllStackConfigsInPathsForStack ¶ added in v1.4.13
func FindAllStackConfigsInPathsForStack( cliConfig schema.CliConfiguration, stack string, includeStackPaths []string, excludeStackPaths []string, ) ([]string, []string, bool, error)
FindAllStackConfigsInPathsForStack finds all stack manifests in the paths specified by globs for the provided stack
func GetContextFromVars ¶ added in v1.3.5
GetContextFromVars creates a context object from the provided variables
func GetContextPrefix ¶ added in v1.3.5
func GetContextPrefix(stack string, context schema.Context, stackNamePattern string, stackFile string) (string, error)
GetContextPrefix calculates context prefix from the context
func GetStackNameFromContextAndStackNamePattern ¶ added in v1.4.9
func GetStackNameFromContextAndStackNamePattern( namespace string, tenant string, environment string, stage string, stackNamePattern string, ) (string, error)
GetStackNameFromContextAndStackNamePattern calculates stack name from the provided context using the provided stack name pattern
func InitCliConfig ¶ added in v1.10.0
func InitCliConfig(configAndStacksInfo schema.ConfigAndStacksInfo, processStacks bool) (schema.CliConfiguration, error)
InitCliConfig finds and merges CLI configurations in the following order: system dir, home dir, current dir, ENV vars, command-line arguments https://dev.to/techschoolguru/load-config-from-file-environment-variables-in-golang-with-viper-2j2d https://medium.com/@bnprashanth256/reading-configuration-files-and-environment-variables-in-go-golang-c2607f912b63
Types ¶
This section is empty.