atmos-functions
БесплатноБез исполняемых скриптовНе проверенUse when wiring cross-component dependencies in stack YAML. Covers !terraform.state syntax for passing outputs between components without remote-state lookups.
от cloudposse★ 100 звёзд на GitHubОб этом скилле
Cross-Component Dependencies with Atmos Functions
Preferred approach: Atmos Functions - Use Atmos template functions in stack YAML to pass values between components at plan/apply time. This avoids Terraform remote state lookups entirely.
!terraform.state Syntax
Two-parameter form (current stack):
!terraform.state <component> <output>
Three-parameter form (specific stack):
!terraform.state <component> <stack> <output>
Examples
components:
terraform:
my-component:
vars:
# Current stack lookups (component output)
vpc_id: !terraform.state vpc vpc_id
subnet_ids: !terraform.state vpc private_subnet_ids
# Cross-stack lookup (component stack output)
grafana_role_arn: !terraform.state grafana core-use2-auto workspace_iam_role_arn
# Nested output with YQ expression
role_arn: !terraform.state iam-role/my-role plat-use2-dev .role.arn
!terraform.output Alternative
There's also !terraform.output which has the same syntax but different behavior:
# Same syntax as !terraform.state
vpc_id: !terraform.output vpc vpc_id
Key differences:
| Aspect | !terraform.state (preferred) |
!terraform.output |
|---|---|---|
| How it works | Reads directly from S3 state bucket | Runs terraform init + terraform output |
| Speed | Fast (direct S3 read) | Slow (full Terraform initialization) |
| Use case | Default choice | When state file format differs |
Always prefer !terraform.state - it's significantly faster because it reads the state file directly from S3
without running Terraform commands.
Best Practices
- Use
!terraform.stateover!terraform.output- Direct S3 access is much faster than running Terraform. - Define lookups in catalog defaults - Put
!terraform.stateexpressions instacks/catalog/<component>/defaults.yamlrather than in stack files. The function automatically resolves based on the current stack context. - Use current-stack lookups when possible - Omit the stack parameter to look up components in the same stack, making configs more portable.
- Cross-stack lookups for shared resources - Use the three-parameter form when referencing centralized resources (e.g., Grafana in core-auto from plat accounts).
Legacy Approach (Being Phased Out)
Some older components still use Cloud Posse's remote-state Terraform module with remote-state.tf files. This pattern
is being phased out in favor of Atmos functions. The tfstate backend is in the core-auto account.
When you encounter remote-state.tf files, prefer converting them to !terraform.state expressions in the catalog.
Установить atmos-functions в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл atmos-functions?
Use when wiring cross-component dependencies in stack YAML. Covers !terraform.state syntax for passing outputs between components without remote-state lookups.
Как установить скилл atmos-functions?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл atmos-functions запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic