with one click
iac-aliyun-template-generating
阿里云 ROS 模板生成——将架构方案转化为可部署的 ROS YAML 模板
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
阿里云 ROS 模板生成——将架构方案转化为可部署的 ROS YAML 模板
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
阿里云 ROS 模板部署技能,负责可用性查询、执行部署与失败恢复
使用 InfraGuard 审查 ROS 模板;有发现时直接修复并验证,初始扫描干净时直接输出模板
阿里云 Alibaba Cloud Policy as Code / InfraGuard 合规策略生成、校验与策略库查询
使用专用 ROS 模板询价工具预估 ROS 模板的月度部署费用,支持按需修复和校验模板问题
阿里云 Alibaba Cloud ROS/Terraform IaC 模板生成、解释、完善、校验、询价与部署
判断用户输入是否为基础设施需求,并从中提取结构化的 IntentSpec
| name | iac-aliyun-template-generating |
| description | 阿里云 ROS 模板生成——将架构方案转化为可部署的 ROS YAML 模板 |
| when_to_use | 当需要根据架构方案生成阿里云 ROS 模板时 |
| user_invocable | false |
| conclusion_schema | {"type":"object","required":["template","file_path","region","description"],"additionalProperties":false,"properties":{"template":{"type":"string","description":"与写入文件相同的 YAML 字符串"},"file_path":{"type":"string","description":"模板文件路径"},"region":{"type":"string","description":"部署地域"},"description":{"type":"string","description":"模板简要描述"}}} |
将架构方案转化为阿里云 ROS(资源编排服务)YAML 模板。
所有 API 调用都需要地域,按以下优先级确定:
Defaults to 'cn-hangzhou'),使用该默认值并告知用户注意:ROS 的模板、资源类型、模块是全局资源,任意地域查询结果相同。不要遍历地域列表。
ros_validate_template 校验;template_url 使用刚写入的模板文件路径,已有具体地域时传 region_id,否则使用工具默认地域模板路径支持本地文件:
ros_validate_template的template_url可传本地文件路径(如/tmp/template.yml)。避免将大模板内容直接作为参数传递。
候选架构可能包含 resource_intents。该字段优先级高于自然语言描述:
resource_intents 中 action=create 的资源才允许出现在 ROS Resources 中作为新建资源。VpcId Parameter,并让 SecurityGroup 的 VpcId 引用该参数。action=forbid 的资源不得在模板中创建;除非用户明确要求引用已有资源,也不要生成相关 Parameter。示例:resource_intents: [{"product": "SecurityGroup", "action": "create"}, {"product": "VPC", "action": "use_existing"}] 时,只生成 ALIYUN::ECS::SecurityGroup,不要生成 ALIYUN::ECS::VPC 或 ALIYUN::ECS::VSwitch。
生成模板时,库存相关属性必须定义为 Parameters(部署前通过 API 查询确定实际值)。具体字段按 references/cloud-products/ 的产品文件和 references/template-parameters.md 执行,不在本技能重复维护产品字段清单。
以下属性不需要参数化,直接使用合理默认值:
资源名称应体现业务用途,不要包含工具名(如 ros):
my-vpc、web-server、app-dbros-ecs、ros-vpc!Ref、!GetAtt 等内置函数引用参数和资源属性,避免硬编码分析错误原因 → 查 GetResourceType Schema(如需)→ 修复 → 重试(最多 5 轮)
| 文件 | 内容 |
|---|---|
| references/template-parameters.md | 模板参数规范:AssociationProperty、Label、分组 |
| references/cloud-products/ | 云产品选型文件(ecs.md、rds.md、redis.md、slb.md、vpc.md、oss.md) |
| references/ros-template.md | ROS 模板最佳实践:RunCommand、嵌套栈、条件部署 |