Clone a stack

更新时间:
复制 MD 格式

You can clone a stack to create a new one based on the template and parameters of an existing stack. This topic describes how to clone a stack using Resource Orchestration Service (ROS).

Prerequisites

An existing stack is required. For more information, see Create a stack.

Limits

You can clone a stack only when it is in one of the following states:

State

Description

CREATE_COMPLETE

The stack is successfully created.

UPDATE_COMPLETE

The stack is successfully updated.

ROLLBACK_COMPLETE

The stack is successfully rolled back.

IMPORT_CREATE_COMPLETE

The stack is successfully created by importing resources.

IMPORT_UPDATE_COMPLETE

The stack is successfully updated by importing resources.

IMPORT_UPDATE_ROLLBACK_COMPLETE

The stack update by importing resources fails, and the stack is successfully rolled back.

CHECK_COMPLETE

The stack check is complete.

Procedure

  1. Log on to the ROS console.

  2. In the navigation pane on the left, click Stacks.

  3. In the top menu bar, select the region where you want to create the stack, such as China (Hangzhou).

  4. On the Stacks page, find the stack that you want to clone and choose 1 > Clone in the Actions column.

  5. On the Configure Parameters page, enter a Stack Name and set the Configure Template Parameters.

    Note

    The template parameters vary depending on the template. Configure the parameters as prompted on the console.

  6. In the Configure Stack Settings section, configure the following parameters and click Next.

    Note

    The template parameters vary depending on the template. Configure the parameters as prompted on the console.

    Configuration Item

    Description

    Stack Policy

    Valid values:

    • No Stack Policy: No stack policy is set.

    • Input Stack Policy: Upload a file or manually enter the stack policy in the text box.

    For more information about stack policies, see Stack policies.

    Rollback on Failure

    Valid values:

    • Yes: Enables rollback if the stack fails to be created.

    • No: Disables rollback if the stack fails to be created.

    Timeout Period

    If the creation or update of all resources is not completed within this period, the system automatically rolls back to the state before the creation or update.

    Valid values: 10 to 1440.

    Unit: minutes.

    Maximum Concurrent Resources

    If you set this parameter to a non-zero value, this configuration is used. Otherwise, the number of concurrent resources is not limited.

    When you update a stack or continue to create a stack, if this value is not set, the previous configuration is used.

    Deletion Protection

    Prevents the stack from being accidentally deleted. Valid values:

    • Enabled: Enables deletion protection.

    • Disabled: Disables deletion protection.

    RAM Role

    Create a RAM role for which Resource Orchestration Service is a trusted entity. Then, grant the RAM role the least privilege 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 the current account to create resources, make sure that the current account has permissions to manage Resource Orchestration Service. This lets you use the stack role to create resources. For more information, see Use a stack role.

      For 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 Manage the permissions of a RAM role.

    • If you do not specify a RAM role, ROS uses the permissions of the current account to create the stack.

    Tags

    Consists of a key-value pair that helps you categorize stacks.

    Click Add. In the Edit Tag Binding dialog box, set a Tag Key and a Tag Value, and then click OK.

    Resource Group

    Select the resource group for the stack. If you do not specify a resource group, the stack is added to the default resource group.

    For information about how to create a resource group, see Create a resource group.

    Stack Event Callback URLs

    The webhook address that receives stack events.

    Manual Payment

    Specifies whether to manually pay for the subscription resources in the template.

    If you select this option, you must manually pay for the orders of subscription resources. You can view the orders to be paid on the stack's product page.

  7. On the Compliance Precheck page, complete the compliance precheck and click Next.

    Note

    The compliance precheck feature is available only for specific resources. For more information, see Compliance precheck.

    1. In the Evaluate Rules section, add compliance rules.

      You can add compliance rules based on the cloud resources in the ROS template.

    2. 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.

  8. On the Check and Confirm page, review the stack configuration.

  9. Click Create.