All Products
Search
Document Center

Cloud Architect Design Tools:Configure template variables

Last Updated:Mar 11, 2026

Define template variables

Configure local variables

  1. On the My Solutions page, find the desired template and click Edit Template. This example uses an ECS template.image

  2. Double-click the product icon to open the configuration dialog box. Properties that support variables are marked with an fx icon.image

  3. Click the fx icon to open the custom variable dialog box. The following table describes each configuration item.image

    Property

    Description

    Format

    Requirements

    Variable value

    Set the variable name.

    ${variable_name}

    • The ${} format is fixed.

    • The variable name can contain only letters, numbers, hyphens (-), and underscores (_).

    Placeholder

    The placeholder format written to the architecture description file.

    ${variable_name} plus a combination of characters, such as 1-9 or A-Z.

    This is usually the same as the variable value.

    When you use a global variable, add the name of the global variable to the placeholder.

    Default value

    The default value for the variable. If you do not assign a value to the variable, the default value is used.

    Default values are not supported for second-level properties.

  4. Define variables for ECS properties, such as Quantity and Instance Name. Click the fx icon to the right of a property to set its custom variables.imageimage

Important

When you configure local variables, the variable name and placeholder must be the same.

Configure global variables

Note

You can use global variables to add the same variable across multiple instance types or in a multi-node deployment. For example, you can configure a global variable to add a common name prefix or suffix to all instances in the following template.

ecs1

  1. After you define the variables, find the template on the My Solutions page and click View Template Variables.image

  2. Click Add Global Variable in the upper-left corner. The configuration method is the same as for local variables.全局变量1全2全3

  3. Modify the local variable using a hyphen (-) to attach the global variable to the beginning or end of the local variable. Then, save the configuration.前1yq2

    Important

    Because global variables are not attached to specific resource properties, they do not have placeholders. When you assign a global variable to a local variable, their data types must be the same.

  4. Name of an instance created from a template

ecs11kafka11

Note

The hyphen (-) used in the global variable example can be replaced with any character or string that meets the instance naming conventions. The connecting character is retained when the variable is replaced.

View template variables

  1. After you define the variables, find the template on the My Solutions page and click View Template Variables.image

  2. View the details of the defined template variables.

    • Variable Name: The name defined for the variable.

    • Default Value: The default value for the variable. This value is used if you do not assign another value.

    • Variable Type: The data type of the variable. This is important because it determines how you assign values to the variable.

    • Placeholder: The placeholder defined for the local variable.image

Delete template variables

You can delete template variables in two ways:

  1. Delete the variable in the View Template Variables dialog box.image

  2. In the variable definition dialog box, click Delete Current Variable.image