Parameter

Use the optional Parameters section to customize your templates. Parameters enable you to input custom values to your template each time you create or update a stack.

The parameter method maps to the CloudFormation Template Anatomy Parameters section.

Example Snippets

There are 3 forms for conditions. Here are example snippets:

# short form
parameter("AmiId")            # no default, so this is a required parameter
parameter("ImageId", "ami-123") # default is ami-123

# medium form
parameter("Company", Default: "boltops", Description: "instance type")

# long form
parameter("InstanceType" => {
  Default: "t2.micro" ,
  Description: "instance type" ,
})

Example Outputs

Parameters:
  AmiId:
    Type: String
  ImageId:
    Default: ami-123
    Type: String
  Company:
    Default: boltops
    Description: instance type
    Type: String
  InstanceType:
    Default: t2.micro
    Description: instance type
    Type: String

Back to DSL Basics Docs.