Assign additional attributes to an ARM template parameter

The ServiceNow system enables you to specify attributes for a parameter that give end users greater power to configure virtual resources. For example, to ensure a consistent list of options for a configuration setting, you can specify that the user can choose from values in an existing table.

Before you begin

Role required: cloud_admin

About this task

Once you have defined the attributes for a parameter, you can generate the variable that will appear on the catalog item.

Procedure

  1. Navigate to Microsoft Azure Cloud > ARM Templates and then select a template.
  2. In the ARM Template Parameters list, click an existing template parameter.
  3. Specify the following attributes for the parameter:
    Field Value
    Name Name of the parameter. For existing parameters, the name is already specified. For new parameters, the name must be alphanumeric and unique among the parameters in the template.
    Template Source template for the parameter that defines this variable.
    Description Description of the variable that will be generated from this parameter.
  4. In this step, you specify the Type of the variable that the system will generate from the parameter.
    If the variable should offer the values in an existing table as choices, select a Type of String and then:
    1. Specify a System type of Reference.
    2. Select the Table and the Column that holds the allowed values.
    Table 1. Template parameter typesAttributes for the types are described in the next step.
    Type Description
    String Any valid JSON string.
    Secure string Any valid JSON string. Displayed on the catalog item as a masked variable.
    Note: Use the secureString type for all passwords, keys, and other secrets. Template parameters with the secureString type cannot be read after resource deployment.
    Int Any valid JSON integer.
    Boolean Any valid JSON Boolean.
    Array Any valid JSON array. Displayed on the catalog item as multi-line text with each line representing one value of the array.
    Object Any valid JSON object. Displayed on the catalog item as a multi-line text-free form field that has some basic JSON validation in the service catalog.
  5. In this step, you specify the attributes of the variable that the system will generate from the parameter.
    Table 2. Attributes of variable types
    Attribute Description
    Default value Default value for the variable.
    Constraint description Enter text that should appear in the field when the requester enters a value that is not an allowed value or that is formatted incorrectly. The text that you enter here will be highlighted to notify the user that the value is not accepted. The text should prompt the requester with the correct format and might include example content that the user should enter into the field. For example: "Enter 8 - 10 alphanumeric characters. For example, 'ABC123456'".
    Allowed values Set of allowed values for the variable (if appropriate).
    Allowed pattern Regular expression that defines the allowed pattern of the value (if appropriate). For example, [\w]+
    Min value / Max value Minimum and maximum value for integer type (if appropriate).
    Min length / Max length Minimum and maximum character count for the value (if appropriate).
    Now that the parameter is fully defined, you can use the parameter settings to generate the variables that will appear in catalog items for requesters of virtual resources.
  6. Repeat the process for all parameters in the template.