Skip to main content

Workflows

Configure where Atmos looks for workflow definition files. Workflows allow you to automate sequences of Atmos commands and other operations.

Configuration

Workflows are configured in the workflows section:

atmos.yaml

workflows:
# Can also be set using 'ATMOS_WORKFLOWS_BASE_PATH' ENV var, or '--workflows-dir' command-line argument
# Supports both absolute and relative paths
base_path: "stacks/workflows"

Configuration Options

workflows.base_path

Base path to Atmos workflow definition files. Supports both absolute and relative paths. When base_path is set in the root configuration, this path is relative to it. Can also be set using ATMOS_WORKFLOWS_BASE_PATH environment variable or --workflows-dir command-line argument.

Directory Structure

A typical workflows directory structure:

stacks/workflows/
├── deploy.yaml
├── destroy.yaml
├── validate.yaml
└── maintenance/
├── backup.yaml
└── rotate-credentials.yaml

Example Workflow File

stacks/workflows/deploy.yaml

workflows:
deploy-vpc:
description: Deploy VPC to all environments
steps:
- command: terraform apply vpc -s plat-ue2-dev --auto-approve
- command: terraform apply vpc -s plat-ue2-staging --auto-approve
- command: terraform apply vpc -s plat-ue2-prod --auto-approve

deploy-all:
description: Deploy all infrastructure
steps:
- command: workflow deploy-vpc
- command: terraform apply eks-cluster -s plat-ue2-dev --auto-approve
- command: terraform apply eks-cluster -s plat-ue2-staging --auto-approve
- command: terraform apply eks-cluster -s plat-ue2-prod --auto-approve

Environment Variables

ATMOS_WORKFLOWS_BASE_PATH
Base path to Atmos workflow definitions.

See Also