When you create a stack group, you can specify accounts and regions for stack instances. This way, stacks that correspond to the stack instances are automatically deployed within the accounts in the regions. If you specify accounts and regions for the stack instances, the stack instances are automatically created within the accounts in the regions. You can also use other methods to create stack instances to deploy stacks.

Background information

Before you create stack instances, you must have the following accounts:
  • Administrator account (Account A): the account within which you create stack instances and a stack group in which the stack instances are created
  • Execution account (Account B): the account within which stacks are deployed
Note The administrator account and the execution account can be the same Alibaba Cloud account. For more information about administrator and execution accounts, see Terms.

This topic describes how to create stack instances and deploy stacks that correspond to the stack instances. In this example, the stack instances are created within the administrator account. The stacks are deployed within the execution account in the China (Hangzhou) and China (Beijing) regions.

Procedure

  1. Log on to the Resource Orchestration Service (ROS) console with the administrator account.
  2. In the left-side navigation pane, click Stack Groups.
  3. In the upper-left corner, select the region where the stack group is deployed from the region drop-down list.
  4. On the Stack Groups page, find the stack group, click more and then choose Create Stack Instance in the Actions column.
  5. In the Set Deployment Options step, configure the following parameters and click Next.
    Parameter Description
    Accounts The account within which the stacks are deployed.

    Configure the Deployment Locations and Accounts parameters based on your business requirements.

    • Deploy Stacks Within Accounts: If you use an Alibaba Cloud account to create stack instances, you can select Deploy Stacks Within Accounts and enter other Alibaba Cloud account IDs in the Accounts field to deploy stacks. Then, the stacks are automatically deployed within the Alibaba Cloud accounts. For example, if you enter the ID of an execution account in the Accounts field when you deploy stacks, the stacks are automatically deployed within the execution account.
      Note If you enter the IDs of multiple accounts, separate the IDs with commas (,). You can also enter the ID of the administrator account in the Accounts field to deploy the stacks within the administrator account.
    • Deploy Stack Within Resource Directories: If you enable a resource directory and use the management account of the resource directory to create stack instances, you can deploy stacks in folders of resource directory. Then, the stacks are automatically deployed in all member accounts in the folders of the resource directory.
    Regions The regions where you want to deploy stacks. Examples: the China (Hangzhou) and China (Beijing) regions.
    Maximum Number of Concurrent Accounts The maximum number of accounts within which multiple stacks are deployed at a time in each region.

    For more information about how to specify Maximum Number of Concurrent Accounts, see Stack group deployment options.

    Fault Tolerance The maximum number of accounts within which stack operation failures can occur in each region. When the value is exceeded, ROS stops the operation in the region. If ROS stops the operation in one region, ROS stops the operation in other regions.

    For more information about how to specify Fault Tolerance, see Stack group deployment options.

  6. In the Specify Override Settings step, select the parameters that you want to override, use one of the following methods to reset the parameter values, and then click Next.
    • Method 1: Choose Edit Override Value > Override Stack Group Parameter Values to reset the parameter values.
    • Method 2: Choose Edit Override Value > Reset Override Field to reset the parameter values.
    Note After the stack instances are created, you can perform the following operations to view the reset parameter values: Log on to the ROS console with the execution account. On the Stacks page, click the ID of the stack for which you want to view the parameter values. On the Parameters tab, view the parameter values.
  7. In the Check and Confirm step, check that the stack instance parameters are valid and click Add.

What to do next

After the stack instances are created, you can perform the following operations to view the status of the stack instances that you create within the execution account: On the Stack Groups page, click the name of the stack group in which the stack instances are created. On the Instances tab, view the status of the stack instances.

When the stacks are being deployed, the stack instances are in the Expired state. After the stacks are deployed, the stack instances enter the Current state. In this case, you can log on to the ROS console with the execution account and view the stacks that are deployed in the China (Hangzhou) and China (Beijing) regions.