按照模板中提到的顺序排列参数

Order the parameters as mentioned in the template

当您在控制台中创建堆栈时,控制台会按逻辑 ID 的字母顺序列出输入参数。可以使用界面自定义顺序。

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-interface.html

但是有没有办法按照模板中提到的那样对参数进行排序?

使用 AWS::CloudFormation::Interface 可以设置顺序,此外还可以将参数组合在一起。您在 Parameters 列表中指定参数的顺序将是它们在控制台中出现的顺序。

下面的例子,取自the aws docs

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?"