Atmos
$ atmos 官方出品 高风险atmos 将 Terraform/OpenTofu 组件代码与多环境 Stack YAML 配置解耦,方便管理多账号、多区域基础设施。其 atmos describe 子命令可直接输出 JSON/YAML 格式的解析配置,而 atmos terraform plan 支持按 Stack 非交互执行。
brew install atmos 本地 Stack YAML 解析器与 Terraform/Helmfile 包装器;atmos describe 可直接返回解析后的 JSON 变量。
Agent 友好度体检单
当前为静态评估(本机尚未安装或尚未运行探针)。可在本地运行 npm run data:probe 并提交 data/probes/ 升级为实测证据。
FCRS-1.0 六维评分拆解
具备强有力的结构化自省能力(atmos describe component --format json、atmos describe affected --format json)与工作流 --dry-run 支持。
- Native
--format jsonondescribeandlistcommands - Supports
--dry-runonworkflowexecution
将只读的 describe/validate/plan 与 apply/destroy 隔离,但调用 terraform apply 与 helmfile apply 仍具真实云端变更风险。
- Schema validation (
atmos validate stacks) catches config errors pre-run - Wraps live
terraform applyanddestroyoperations
静态 Go 单二进制,全平台覆盖 Homebrew、Go、apt/apk 与 GitHub Releases。
- Static Go binary with zero external script dependencies
一步把多层 YAML 继承解析为完整 JSON,Agent 无需手动追踪数十个导入文件。
describe componentanddescribe affectedeliminate manual YAML merging
Cloud Posse 官方主力 CLI(cloudposse/atmos),Apache-2.0 协议持续维护。
- Maintained by Cloud Posse under Apache-2.0
atmos.tools 提供完善的命令手册与架构文档。
- Comprehensive CLI docs at atmos.tools/cli/commands/
安全边界、鉴权与放权指南
读取本地 atmos.yaml 及可选的 AWS SSO/身份配置;云端认证透传给标准 AWS/GCP/Azure 环境变量或 Profile。
Cloud Posse 旗下 Apache-2.0 开源项目,完全免费。
# Atmos Agent Rules - Inspect resolved stack variables via `atmos describe component <comp> -s <stack> --format json` first. - Restrict agent mutations to `atmos terraform plan` and `atmos validate`; never run `apply` or `destroy` without approval. - Always pass `-s <stack>` explicitly to avoid ambiguity.
Agent 高频安全命令配方
只读查询(安全推荐)
atmos describe component vpc -s ue1-prod --format json
将多层继承与深度合并后的 Stack 变量解析为单个 JSON 载荷,不触碰云基础设施。
atmos terraform plan vpc -s ue1-prod
生成 .tfvars.json 并对目标 Stack 运行只读 terraform plan。
受控写入与预演
atmos terraform generate backend vpc -s ue1-prod
在本地为指定组件与 Stack 生成 backend.tf.json 文件。
核心优势
- +
atmos describe component -s <stack> --format json一次调用即可展平复杂 YAML 继承。 - +
atmos describe affected --format json基于 Git 变更精准识别受影响组件。 - + 内置
atmos validate stacks支持 Stack 配置 Schema 校验。
注意事项与踩坑点
- ! 底层包装的
terraform apply与destroy若被误调用仍会修改真实云资源。 - ! 强依赖符合
atmos.yaml规范的目录结构。