| title | Stores Configuration |
|---|---|
| sidebar_label | stores |
| sidebar_class_name | command |
| id | stores |
| description | Configure external stores for sharing data between components in atmos.yaml. |
import File from '@site/src/components/File' import Intro from '@site/src/components/Intro'
The `stores` section in `atmos.yaml` configures external key-value stores that can be used to share data between components using the [`!store`](/stacks/sharing-state/stores) YAML function and [hooks](/stacks/hooks). ```yaml stores: # AWS SSM Parameter Store prod/ssm: backend: aws/ssm config: region: us-east-1prod/secrets: backend: aws/secretsmanager config: region: us-east-1
prod/azure: backend: azure/keyvault config: vault_name: my-keyvault
prod/gcp: backend: gcp/secretmanager config: project_id: my-project
cache: backend: redis config: host: localhost port: 6379
artifacts: backend: artifactory config: url: https://artifactory.example.com
</File>
## Store Name Convention
Store names follow the pattern `<environment>/<type>` by convention:
- `prod/ssm` - Production SSM Parameter Store
- `dev/secrets` - Development Secrets Manager
- `shared/config` - Shared configuration store
You can reference stores in stack configuration using the `!store` function:
```yaml
vars:
database_password: !store prod/secrets::database/password
api_key: !store prod/ssm::/app/api-key
- `aws/ssm`
- AWS Systems Manager Parameter Store. Stores and retrieves parameters from SSM.
- `aws/secretsmanager`
- AWS Secrets Manager. Stores and retrieves secrets with automatic rotation support.
- `azure/keyvault`
- Azure Key Vault. Stores and retrieves secrets from Azure.
- `gcp/secretmanager`
- Google Cloud Secret Manager. Stores and retrieves secrets from GCP.
- `redis`
- Redis key-value store. Useful for caching and temporary data.
- `artifactory`
- JFrog Artifactory. Stores and retrieves artifacts and metadata.
You can write values to stores using hooks:
components:
terraform:
vpc:
hooks:
store-outputs:
events:
- after-terraform-apply
command: store
name: prod/ssm
outputs:
- vpc_id
- subnet_idsThis writes Terraform outputs to the configured store after apply completes.
- External Stores - Using
!storefunction in stacks - Hooks - Writing to stores with hooks
- Terraform State - Alternative data sharing method