Application template parameters

Platform ASC uses an application template that includes keys, parameters, and attributes to instantiate the application template.

Each parameter under the parameters key is specified in a separate nested block that contains the parameter name and any additional attributes. For example:
parameters:
    serviceA_rg:
        type: string
        label: Resource Group for Service A
        description: Describe how this parameter is used for Service A
        constraints:
               - custom_constraint: asc.getresourcegroup

A parameter can consist of the following required and optional attributes:

parameter name

Description: The parameter name.

Required or optional: Required

Example: serviceA_rg

type

Description: The parameter type.

Required or optional: Required

Valid values: string, number, or boolean.

Example: string

label

Description: Parameter name that appears in the New Application Instance wizard.

Required or optional: Optional

Example: Describe how this parameter is used for Service A

description

Description: Parameter description that appears in the New Application Instance wizard.

Required or optional: Optional

Example: Resource Group for Service A

default

Description: Default value of the parameter.

Required or optional: Optional

constraints

Description: Defines a list of constraints that must all be fulfilled by user input to validate the parameter.

Required or optional: Optional

A parameter can consist of the following parameter constraints:

constraints > length

Description: Applies to string parameters to define a lower and upper limit for the length of the string value.

Required or optional: Optional

Valid values: { min: <lower limit>, max: <upper limit> }

Example: { min: 5, max: 8}

constraints > range

Description: Applies to number parameters to define a lower and upper limit for the length of the number value.

Required or optional: Optional

Valid values: { min: <lower limit>, max: <upper limit> }

Example: { min: 1000, max: 1100}

constraints > allowed_values

Description: Applies to string or number parameters to define a set of valid values.

Required or optional: Optional

Valid values: [ <value>, <value>, ... ]

Example: [50, 60, 70]

constraints > allowed_pattern

Description: Applies to string parameters to specify a regular expression for the parameter.

Required or optional: Optional

Valid values: <regular expression>

Example: "[A-Z]+[a-zA-Z0-9]*"

constraints > custom_constraint

Description: Triggers the PMC to allow the user to select an object in the New Application Instance wizard.

Required or optional: Optional

Valid values: asc.getresourcegroup, asc.getpackage

constraints > description

Description: Defines the previous constraint.

Required or optional: Optional

Example: Port range must be 1000 - 1100