amazon-cloudformation - 订购模板中提到的参数
问题描述
在控制台中创建堆栈时,控制台会按逻辑 ID 的字母顺序列出输入参数。有办法使用接口自定义订单。
但是有没有办法按照模板中提到的那样对参数进行排序?
解决方案
使用AWS::CloudFormation::Interface
它可以让您设置顺序,还可以将您的参数组合在一起。您在列表中指定参数Parameters
的顺序将是它们在控制台中出现的顺序。
下面的示例,取自aws 文档
Metadata:
AWS::CloudFormation::Interface:
ParameterGroups:
-
Label:
default: "Network Configuration"
Parameters:
- VPCID
- SubnetId
- SecurityGroupID
-
Label:
default: "Amazon EC2 Configuration"
Parameters:
- InstanceType
- KeyName
ParameterLabels:
VPCID:
default: "Which VPC should this be deployed to?"
推荐阅读
- java - 使用数组列表查找素数
- linker - CodeBlocks 无法链接 allegro 库
- java - Java WatchService,使用线程对事件执行操作
- html - HTML CSS 将行的内容与居中的行跨度对齐
- flutter - 如何通过用户操作从子小部件重建父小部件?
- powerbi - 如何在 Power BI 中修改数据集的数据流?
- javascript - 为 Next.js 构建带有 CSS 模块的包
- java - 如何从命令行而不是 Intellij IDEA 运行 JUnit 测试?
- kubernetes - Airflow worker 在 kubernetes executor 上没有任何注解
- mysql - 如何将运算符从 NodeJS 传递给 SQL