This topic describes how to use Outputs in a template to display descriptions in Chinese and sort parameters in a specific order in Resource Orchestration Service (ROS).
Sample templates
ROS template
Parameters:Outputs: TiDB: Label: TiDB Value: Fn::Sub: - mysql://${ServerAddress}:4000 - ServerAddress: Fn::GetAtt: - SlbTiDB - IpAddress TiDB Dashboard: Label: en: Specifications-EN zh-cn: Specifications-cn Value: Fn::Sub: - http://${ServerAddress}:2379 - ServerAddress: Fn::GetAtt: - ControlServerEip - EipAddress Grafana: Label: en: Grafana-EN zh-cn: Grafana-cn Value: Fn::Sub: - http://${ServerAddress}:3000 - ServerAddress: Fn::GetAtt: - ControlServerEip - EipAddress ErrorData: Description: JSON serialized dict containing data associated with wait condition error signals sent to the handle. Value: Fn::GetAtt: - InvocationWaitCondition - ErrorData Metadata: ALIYUN::ROS::Interface: Outputs: - TiDB - TiDB Dashboard - Grafana - ErrorData
Outputs
: defines the order in which parameters are sorted. You can specifyOutputs
in theMetadata
section to define the order.Label
: defines parameters in English and Chinese.
Terraform template
output "graph_private_ip" { description = <<EOT { "Label": "The private ip", "Description": "The private ip of the graph nodes." } EOT value = join("\n", module.graph-nodes.this_private_ip) }
Sample GUI
After the stack is created, you can view the descriptions in Chinese and the order in which the parameters are sorted on the Stack Information tab.