When you create an infrastructure template in Resource Orchestration Service (ROS) Infrastructure Composer, you can compose the resource architecture of your infrastructure on a visual canvas, configure resource properties on forms, and then perform price inquiries and automated deployment for the resources in the architecture.
Compose a resource architecture
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, click Create Infrastructure Template. In the dialog box that appears, select ROS or Terraform based on your business requirements and click OK.
If you select ROS, ROS Infrastructure Composer provides ROS resource types that you can use to compose a resource architecture and automatically generates a ROS template based on the resource architecture.
If you select Terraform, ROS Infrastructure Composer provides Terraform resource types that you can use to compose a resource architecture and automatically generates a Terraform template based on the resource architecture.
In the left-side navigation pane, unfold the resource list to find the desired resources, such as the Single-zone Network and ECS Instance resources, and drag the resources to the canvas.
NoteIn the upper part of the left-side navigation pane, enter content in Chinese or English in the Search for resource types search box to search for the desired resource types.
In the upper part of the left-side navigation pane, click Quick Create to unfold common network architectures and cloud resources for quick selection.
On the canvas, connect resources that interact with each other. For example, you must connect an EIP resource to an ECS Instance resource because the resources interact with each other.
NoteYou can perform the following steps to connect resources: Click a resource node on the canvas to highlight the resource node and display a connector port on each of the four sides. Click a connector port and drag the port to the connector port of another resource node.

(Optional) Configure region and resource properties
On the canvas, click the region node
. On the right-side form that appears, select the desired region. In this example, China (Hangzhou) is selected. On the canvas, click the zone node
. On the right-side form that appears, select the desired zone. In this example, Zone G is selected.
The zone is contained as a parameter in the Parameters section of the generated template. By default, the zone is hidden during the deployment. If you want to specify a zone during the deployment, you can turn off Whether to Hide Parameters to show the zone parameter.
On the canvas, click the node of the resource whose properties you want to configure. On the right-side form that appears, configure the resource properties. In this example, the properties in the Payment, Network Configuration, and Storage sections are configured on the ECS Instance (ECSInstance) form.

(Optional) Manage template parameters and outputs
In the upper-right corner above the canvas, click Template. On the Template Content tab, view the ROS and Terraform templates that are automatically generated.
Click the Parameters tab to manage template parameters.
Click the Outputs tab to manage template outputs.
For more information, see Manage the parameters and outputs of an infrastructure template.
(Optional) Specify a name for the infrastructure template
In the upper-left corner above the canvas, click the
icon. In the drop-down menu that appears, click Rename. In the Rename dialog box, enter a name for the infrastructure template in the field and click Confirm.
(Optional) Save the infrastructure template
In the upper-left corner above the canvas, click the
icon. In the drop-down menu that appears, choose Save Modification > Save as Draft or Save Modification > Save New Version. Then, ROS Infrastructure Composer saves the ROS or Terraform template that is automatically generated based on the resource architecture on the My Templates page in the ROS console.
If you choose Save Modification > Save as Draft, ROS Infrastructure Composer performs basic validation on the template syntax but does not validate the resource properties before ROS saves the infrastructure template as a draft.
If you choose Save Modification > Save New Version, ROS Infrastructure Composer performs strict validation on the template syntax before ROS saves an official version of the infrastructure template in the "vx" format. "x" starts at 1 and increases in increments of 1.
ROS Infrastructure Composer provides the AutoSave mechanism, which is automatically triggered, to save an infrastructure template as a draft when the infrastructure template changes.