shantanuo
shantanuo

Reputation: 32286

Order the parameters as mentioned in the template

When you create stacks in the console, the console lists input parameters in alphabetical order by their logical IDs. There is way to customize the order using Interface.

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

But is there any way to order the parameters as mentioned in the template?

Upvotes: 1

Views: 2952

Answers (1)

Stretch
Stretch

Reputation: 3759

Use AWS::CloudFormation::Interface which allows you to set the order, and also additionally you can group your parameters together. The order you specify the parameters in the Parameters list, will be the order they appear in the console.

Example below, taken from 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?"

Upvotes: 8

Related Questions