Use ROS Template Transformer commands to convert Excel, Terraform, or AWS CloudFormation templates into ROS templates and format existing ROS templates.
View help information
Run the following command to view help information for Template Transformer.
rostran --help
Transform a template
Run the following command to transform a template.
rostran transform SOURCE_PATH [OPTIONS]
The following table describes the parameters.
|
Parameter |
Required |
Description |
|
|
Yes |
The path of the source template file. The source template can be in Excel, Terraform, or AWS CloudFormation format. |
|
|
No |
Valid values:
|
Sample transform templates:
Format a template
Run the following command to format a template.
rostran format [OPTIONS] PATH...
The following table describes the parameters.
|
Parameter |
Required |
Description |
|
|
Yes |
The path of the ROS template file to format. Note
You can specify multiple template file paths. |
|
|
No |
Valid values:
|
Formatting rules
The template sections are sorted in the following order: ROSTemplateFormatVersion, Transform, Description, Conditions, Mappings, Parameters, Resources, Outputs, Metadata, and Workspace.
The sorting rules for each section are as follows:
-
Conditionssection: Sorted in ascending alphabetical order. -
Mappingssection: Sorted in ascending alphabetical order. -
Parameterssection: Sorted in the order defined inMetadata.ALIYUN::ROS::Interface.ParameterGroups.Parameters, if it exists. The properties of each parameter are sorted in the order of type, description, constraint, and other properties. -
Resourcessection: Sorted by resource dependency, with dependent resources placed first. The properties of each resource are sorted according to specific rules. -
Outputssection: The properties are sorted in the order ofDescription,Condition, andValue. -
Metadatasection: Sorted in the order ofALIYUN::ROS::Interface,ALIYUN::ROS::Designer, andPredefinedParameters. The value properties of each item are sorted according to specific rules. -
Workspacesection: Sorted in ascending alphabetical order, withmain.tfalways placed first.