All Products
Search
Document Center

Resource Orchestration Service:Create a stack

Last Updated:Dec 04, 2025

You can create a stack from a Resource Orchestration Service (ROS) template or a Terraform template to create and manage a new group of resources.

Create a stack from an existing template

  1. Log on to the ROS console.

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

  3. In the top menu bar, select a region for the stack from the region drop-down list. For example, select China (Hangzhou).

  4. On the Stacks page, click Create Stack. In the Specify Template section, click Select an Existing Template.

    Note
    • If you select Create a New Template or ROS Infrastructure Composer, you are redirected to the corresponding page.

  5. Specify a template as required 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 system automatically populates the template content. For more information about how to create a template, see Create a template and Create an infrastructure graph template.

    • Use URL: Enter the URL of the template and click Extract Template Content. The system automatically populates the template content.

      If you want to use the URL of a ROS template file that is stored in an Object Storage Service (OSS) bucket, you must configure cross-domain access. For more information, see Configure cross-domain access for ROS templates.

    • Public Templates: Select a public template. The system automatically populates the template content.

    • Shared Template: Select a template and template version that another user shared with you. The system automatically populates the template content. For more information about how to share a template, see Share a template with an Alibaba Cloud account.

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

    Note

    The template parameters that you must configure vary based on the template. Follow the instructions in the console to enter the parameter values.

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

    Configuration Item

    Description

    Stack Policy (Optional)

    Valid values:

    • No Stack Policy: Does not set a stack policy.

    • 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

    Value:

    • Yes: Enables the rollback policy.

    • No: Disables the rollback policy.

    Timeout Period

    If the creation or update of all resources is not complete within this time, the system automatically rolls back the resources to their previous state.

    Value range: 10 to 1440.

    Unit: minutes.

    Maximum Concurrent Resources

    If you set this configuration to a non-zero value, this configuration is used. Otherwise, no limit is imposed.

    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

    You can create a RAM role that uses Resource Orchestration Service as a trusted entity. Then, grant the least privilege permissions to the RAM role based on 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, make sure that your 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 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 Grant permissions to a RAM role.

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

    Tags

    A key-value pair that helps you categorize stacks.

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

    Resource Group

    You can 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 more 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 that are generated for subscription resources. You can view the orders to be paid on the stack details page.

  8. On the Compliance Precheck (Optional) page, complete the compliance check and click Next.

    Note

    The compliance precheck feature is supported only for some resources. For more information, see Compliance precheck.

    1. In the Detection Rules section, add detection rules.

      You can select the rules to check based on the cloud resources in the ROS template.

    2. Click Start Check.

      If a resource is detected as Non-compliant, click Remediation Plan. Modify the cloud resource configuration or the ROS template content based on the Remediation Plan to ensure resource compliance.

      image

  9. On the Check and Confirm (Optional) page, click Create.

    After the stack is created, Create Succeeded appears in the Status column.

References