When you want to create a stack based on the template and parameters of an existing stack, you can clone the existing stack. This topic describes how to clone a stack in the Resource Orchestration Service (ROS) console.
Prerequisites
A stack is created. For more information, see Create a stack.
Limits
You can clone a stack that is only in one of the following states.
State | Description |
CREATE_COMPLETE | The stack is created. |
UPDATE_COMPLETE | The stack is updated. |
ROLLBACK_COMPLETE | The stack is rolled back. |
IMPORT_CREATE_COMPLETE | The stack is created by importing resources. |
IMPORT_UPDATE_COMPLETE | The stack is updated by importing resources. |
IMPORT_UPDATE_ROLLBACK_COMPLETE | The stack failed to be updated by importing resources and is rolled back. |
CHECK_COMPLETE | The stack is verified. |
Log on to the ROS console.
In the left-side navigation pane, click Stacks.
In the upper-left corner of the page, select the region where the desired stack is deployed from the drop-down list.
On the Stacks page, find the stack and choose in the Actions column.
In the Configure Template Parameters step, configure the Stack Name parameter and other parameters. Then, click Next.
In the Compliance Precheck step, complete compliance precheck and click Next.
NoteThe compliance precheck feature is available only for specific resources. For more information, see Compliance precheck of ROS.
In the Evaluate Rules section, add an evaluation rule.
You can add evaluation rules based on the cloud resources in the ROS template.
Click Evaluate.
You can modify the template content based on the suggestions that are provided to remediate invalid resources to ensure the compliance of the resources.
Optional:In the Configure Stack step, configure the following parameters. Click Next.
NoteThe parameters that you configure vary based on the template. Follow the on-screen instructions to configure the parameters.
Parameter
Description
Stack Policy
Valid values:
No Stack Policy: Do not specify a stack policy.
Input Stack Policy: Upload a stack policy or enter a stack policy in the text editor.
For more information about stack policies, see Stack policies.
Rollback on Failure
Valid values:
Enabled: enables rollback when the stack fails to be created.
Disabled: disables rollback when the stack fails to be created.
Timeout Period
If all resources failed to be created or updated within the timeout period, the system automatically rolls the resources back to the previous status.
Valid values: 10 to 1440.
Unit: minutes.
Deletion Protection
This feature prevents the stack from being unintentionally deleted. Valid values:
Enabled: enables deletion protection.
Disabled: disables deletion protection.
RAM Role
You can create a RAM role whose trusted entity is ROS. Then, you can grant the minimum permissions to the RAM role based on the required permissions of resources in the template.
If you specify a RAM role, ROS creates the stack based on the permissions of the RAM role. For more information about how to create a RAM role and grant permissions to the RAM role, see Create a RAM role for a trusted Alibaba Cloud service and Grant permissions to a RAM role.
If you do not specify a RAM role, ROS creates the stack based on the permissions of your Alibaba Cloud account.
Tags
A tag is a key-value pair that you can use to classify stacks.
You can perform the following operations to add a tag: Click Add. In the Edit tag dialog box, configure Tag key and Tag value, and click Confirm.
Resource Group
You can specify a resource group to which the stack belongs. If you do not specify a resource group, 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 URLs that are used to receive the events of the stack.
Optional:In the Check and Confirm step, check and confirm the configurations of the stack.
Click Create.