The parameters and outputs of an infrastructure template provide the same features as the parameters and outputs of its automatically generated Resource Orchestration Service (ROS) and Terraform templates. ROS Infrastructure Composer is embedded with forms on which you can manage the parameters and outputs of an infrastructure template. This topic describes how to view, add, and configure the parameters and outputs of an infrastructure template.
Prerequisites
An infrastructure template is created. For more information, see Create an infrastructure template.
Manage the parameters of an infrastructure template
Go to the ROS Infrastructure Composer module in the ROS console.
In the left-side navigation pane, click Infrastructure Templates.
On the Infrastructure Templates page, find the desired infrastructure template and click the card.
In the upper-right corner above the canvas, click Template. Then, click the Parameters tab. You can perform the following operations on the tab:
View parameters: View all parameters that are defined in the infrastructure template.
Add parameters: Click Add Parameter to display the Parameter Configurations tab on which you can configure parameters. You can also click the JSON or YAML tab to configure parameters. The following table describes the fields on the Parameter Configurations tab.
Delete parameters: Move the pointer over the parameter you want to delete and click
.
Field
Description
Parameter Name
Specify a name for the parameter. The parameter name can contain letters, digits, hyphens (-), and underscores (_). The parameter name cannot contain spaces or be the same as other parameter names in the infrastructure template.
Parameter Type
Specify the data type of the parameter. Valid values:
String: corresponds to theStringdata type in the template syntax.Number: corresponds to theNumberdata type in the template syntax.Boolean: corresponds to theBooleandata type in the template syntax.JSON: corresponds to theJsondata type in the template syntax.List: corresponds to theCommaDelimitedListdata type in the template syntax.
For more information, see
Typein Overview.Business Components
Select a business component, which helps you select parameter configurations based on optional values in the console. This field corresponds to
AssociationPropertyandAssociationPropertyMetadatain the template syntax.For more information, see AssociationProperty and AssociationPropertyMetadata.
Default Value
Specify a default value for the parameter. If you do not specify a value for a template parameter when you create a stack, ROS checks whether a default value is defined for the parameter in the template. If a default value is defined in the template, ROS uses the default value. Otherwise, an error is reported. This field corresponds to
Defaultin the template syntax.For more information, see
Defaultin Overview.Parameter Label
Specify an alias for the parameter. This field corresponds to
Labelin the template syntax.For more information, see
Labelin Overview.Parameter Description
Specify a description for the parameter. This field corresponds to
Descriptionin the template syntax.For more information, see
Descriptionin Overview.Optional Parameters
Specify valid values for the parameter. This field corresponds to
AllowedValuesin the template syntax.For more information, see
AllowedValuesin Overview.Maximum Length
Specify an integer value, which represents the largest number of characters allowed for a String-type parameter value. This field corresponds to
MaxLengthin the template syntax.For more information, see
MaxLengthin Overview.Minimum Length
Specify an integer value, which represents the smallest number of characters allowed for a String-type parameter value. This field corresponds to
MinLengthin the template syntax.For more information, see
MinLengthin Overview.Whether to Use as Password Component
Specify whether to set the parameter value as sensitive data and display the parameter value masked as asterisks (*) in the Outputs tab in the console. This field corresponds to
NoEchoin the template syntax.For more information, see
NoEchoin Overview.Whether to Enable Duplicate Verification
Specify whether to require secondary confirmation of the parameter value in the console. By default, the field is disabled. This field corresponds to
Confirmin the template syntax.For more information, see
Confirmin Overview.NoteThis field appears only when Whether to Use as Password Component is enabled.
Whether to Support Line Breaks
Specify whether to display the parameter with a multi-line field. This field corresponds to
TextAreain the template syntax.For more information, see
TextAreain Overview.Regular Expression for Text Verification
Enter a regular expression, which is used to check whether a String-type parameter is matched. If you do not specify a String-type parameter, an error is reported. This field corresponds to
AllowedPatternin the template syntax.If you use one or more of the following special characters, add two backslashes (\\) as an escape character before each special character:
*.?+-$^[ ]( ){ }|\/NoteYou do not need to add escape characters before hyphens (-) that are placed at the start and end of a regular expression. Example: [a-z-].
For more information, see
AllowedPatternin Overview.Prompt After Text Verification Failure
Enter a tip that appears if the string fails to be matched by using the specified regular expression. This field corresponds to
ConstraintDescriptionin the template syntax.For more information, see
ConstraintDescriptionin Overview.
Manage the outputs of an infrastructure template
Go to the ROS Infrastructure Composer module in the ROS console.
In the left-side navigation pane, click Infrastructure Templates.
On the Infrastructure Templates page, find the desired infrastructure template and click the card.
In the upper-right corner above the canvas, click Template. Then, click the Outputs tab. You can perform the following operations on the tab:
View outputs: View all outputs that are defined in the infrastructure template.
Add outputs: Click Add Output to display the Output Settings tab on which you can configure outputs. You can also click the JSON or YAML tab to configure outputs. The following table describes the fields on the Output Settings tab.
Field
Description
Output Name
Specify a name for the output. The output name can contain letters, digits, hyphens (-), and underscores (_). The output name cannot contain spaces or be the same as other output names in the infrastructure template.
Output Values
Select the resource and the resource property that you want to obtain after you create the stack.
From the first drop-down list, select a resource from all the resources defined in the infrastructure template.
From the second drop-down list, select a property from all the properties of the resource.
Condition
Specify a condition, which is used to control whether to create a resource and return its information. The output takes effect only when the condition is evaluated to true or no condition is specified. This field corresponds to
Conditionin the template syntax.For more information, see
Conditionin Outputs.Label
Specify an alias for the output. This field corresponds to
Labelin the template syntax.For more information, see
Labelin Outputs.Description
Specify a description for the output. This field corresponds to
Descriptionin the template syntax.For more information, see
Descriptionin Outputs.