Create a stack from a Resource Orchestration Service (ROS) template or a Terraform template to provision and manage a set of cloud resources.
Create a stack from an existing template
-
Log in to the ROS console.
-
In the left-side navigation pane, click Stacks.
-
In the top navigation bar, select the region where you want to create the stack, such as China (Hangzhou).
-
On the Stacks page, click Create Stack. In the Specify Template section, click Select an Existing Template.
Note-
If you select Create Template or ROS Infrastructure Composer, you are redirected to the corresponding page.
-
If you select Synchronize Template from Code Repository, see Manage stacks by using a code repository.
-
-
Specify the template and click Next.
Select a Template Import Method and configure the template.
-
Enter Template Content: In the Template Content section, enter a ROS or Terraform template. For more information about how to write a template, see ROS template structure and Terraform template structure.
-
My Templates: Select an existing template and template version. The template content is automatically populated. For more information about how to create a template, see Create a template and Create an architecture diagram template.
-
Use URL: Enter the URL of the template and click Get Template Content. The template content is automatically populated.
To use the URL of a ROS template file stored in an OSS bucket, configure cross-origin resource sharing (CORS). For more information, see Access ROS templates across domains.
-
Public Templates: Select a public template. The template content is automatically populated.
-
Shared Templates: Select a template and template version shared by another user. The template content is automatically populated. For more information about how to share a template, see Share a template with an Alibaba Cloud account.
-
-
On the Configure Parameters page, enter a Stack Name and configure the Configure Template Parameters.
NoteThe required parameters vary by template. Enter the parameter values as prompted.
-
In the Configure Stack Settings section, configure the following parameters, and then click Next.
Parameter
Description
Stack Policy
Valid values:
-
No Stack Policy: Does not set a stack policy.
-
Input Stack Policy: Upload a file or enter the stack policy in the text box.
For more information about stack policies, see Stack policy.
Rollback on Failure
Valid values:
-
Yes: Enables the rollback policy if stack creation fails.
-
No: Disables the rollback policy if stack creation fails.
Timeout Period
If ROS fails to create or update all resources within the specified period, it rolls back resources to their previous state.
Value range: 10 to 1440.
Unit: minutes.
Maximum Concurrent Resources
A non-zero value limits the number of resources created or updated concurrently. A value of zero means no limit.
When you update a stack or resume its creation, the previous setting is used if a new value is not specified.
Deletion Protection
Prevents the stack from being accidentally deleted. Valid values:
-
Enabled: Enables deletion protection.
-
Disabled: Disables deletion protection.
RAM Role
You can create a RAM role with ROS as a trusted entity, then grant only the permissions required by the resources in the ROS template.
-
If you specify a RAM role, ROS creates resources based on the permissions of the RAM role.
If you want to use a stack role instead of your current account to create resources, ensure that your current account has ROS management permissions. For more information, see Use a stack role.
For more information about how to create a RAM role and grant permissions to a RAM role, see Create a RAM role for a trusted Alibaba Cloud service and Manage the permissions of a RAM role.
-
If unspecified, ROS uses your current account permissions to create the stack.
Tags
Key-value pairs used to categorize and manage stacks.
Click Add. In the Edit Tag Binding dialog box, set a Tag Key and Tag Value, and then click OK.
Resource Group
Select a resource group for the stack. If no resource group is specified, the stack is added to the default resource group.
For more information about how to create a resource group, see Create a resource group.
Stack Event Callback URLs
The callback URL for receiving stack event notifications.
Manual Payment
Specifies whether to manually pay for subscription resources defined in the template.
If you select this option, you must manually pay for the resulting subscription orders. Unpaid orders can be viewed on the stack details page.
-
-
On the Compliance Precheck page, complete the compliance check, and then click Next.
NoteThe compliance precheck feature is available only for specific resources. For more information, see Compliance precheck.
-
In the Detection Rules section, add detection rules.
Select detection rules based on the cloud resources defined in the ROS template.
-
Click Start Check.
If a resource is found to be Non-compliant, you can click Remediation Plan and modify the cloud resource configuration or ROS template content based on the Remediation Plan to ensure resource compliance.
-
-
On the Check and Confirm page, click Create.
After the stack is created, the Status column displays Successful Creation.
Related topics
-
Manage stacks
-
Manage existing resources by using resource import