Skip to main content

Common Errors

Common Mistakes

  • Running out of date version of atmos with newer configuration parameters
  • An atmos.yaml with incorrect stacks.stack_name pattern (often due to copy pasta)

Common Errors

Here are some common errors that can come up.

Error: stack name pattern must be provided

stack name pattern must be provided in 'stacks.name_pattern' config or 'ATMOS_STACKS_NAME_PATTERN' ENV variable

This means that you are probably missing a section like this in your atmos.yml. See the instructions on CLI Configuration for more details.

stacks:
name_pattern: "{tenant}-{environment}-{stage}"

Error: The stack name pattern ... does not have a tenant defined

The stack name pattern '{tenant}-{environment}-{stage}' specifies 'tenant', but the stack ue1-prod does not have a tenant defined

This means that your name_pattern declares a tenant is required, but not specified in the Stack configurations. Either specify a tenant in your vars for the Stack configuration, or remove the {tenant} from the name_pattern.

stacks:
name_pattern: "{tenant}-{environment}-{stage}"

Error: depends_on expected a map, got slice

decoding: depends_on expected a map, got slice

The depends_on functionality originally existed only under settings.spacelift.depends_on and was a list of other components that the current component depends on.

We have since updated depends_on to be more generic and be directly under settings.depends_on (so it can also be used in GitHub Actions and other tools).

The updated key is now a map (rather than a list). If you see this error, it means that someone put a depends_on block directly under settings but added it as a list (rather than a map as the new config requires).

The solution is to move it under settings.spacelift.depends_on (legacy, deprecated, not recommended) or update the dependencies to be a map.

components:
terraform:
top-level-component2:
metadata:
component: "top-level-component1"
settings:
spacelift:
workspace_enabled: false
depends_on:
1:
# If the `context` (namespace, tenant, environment, stage) is not provided,
# the `component` is from the same Atmos stack as this component
component: "test/test-component"
2:
# If the `context` (namespace, tenant, environment, stage) is not provided,
# the `component` is from the same Atmos stack as this component
component: "test/test2/test-component-2"
3:
file: "examples/tests/components/terraform/mixins/introspection.mixin.tf"
4:
folder: "examples/tests/components/helmfile/infra/infra-server"
vars:
enabled: true