Updated on 2023-08-11 GMT+08:00

outputs

After deployment operations are complete, all objects defined in a template will be created. To view the deployment results more intuitively, write the results in the output section of the template. Generally, common outputs include the access address+port number, application URL, and initial account password.

The outputs section is optional and defines the output parameters during stack running. Each output parameter must have a unique name.

Format of the outputs section:

<Output parameter name>:
  description: <Description>
  value: <Value>
Table 1 Parameter property description

Property

Mandatory

Type

Value Constraint

Description

Output parameter name

Yes

String

The value must be 1 to 20 characters long. Only lowercase letters, digits, and hyphens (-) are allowed.

Name of an output parameter, which must be unique.

Description

No

Text string

Text string, supporting a maximum of 255 characters

Name of a mapping object, which must be unique.

value

Yes

-

-

value is used to define an output value. It can be a text, string, or number. The value can be concatenated by the concat and get_attribute built-in functions, or be obtained from input parameters.

NOTE:

A parameter that begins with a hyphen (-) can be considered as an array.

Example configuration of outputs:

outputs:
  ecs-eip:
    description: elastic IP address of the Elastic Cloud Server (ECS)
    value:
      get_attribute:
        - myecs
        - publicIps