If you enable a resource directory and use the management account or a delegated administrator account in the resource directory to create a stack group that has service-managed permissions, you can enable automatic deployment for the stack group. If member accounts of folders in the resource directory to which stack instances belong are changed, Resource Orchestration Service (ROS) changes the stack instances within the member accounts. This helps you manage stack instances within member accounts in a centralized manner. You can modify automatic deployment settings based on your business requirements.

Prerequisites

A service-managed stack group is created. For more information, see Step 3: Create a stack group.

Scenarios

If you add a member account to the folder to which a stack group belongs after you enable automatic deployment, ROS deploys the stack instances in the stack group within the account. If you delete the account from the folder, ROS deletes the stack instances in the stack group within the account.

Automatic deployment is suitable for the following scenarios:

  • Scenario 1: A member account is moved between folders.

    If you enable automatic deployment for the stack group whose resource directory contains Folder 1 and Folder 2 when a member account of Folder 1 is moved to Folder 2, ROS performs the following operations to move the stack instances within the member account to Folder 2: ROS deletes the stack instances in the specified region within the member account of Folder 1, creates the same stack instances, and then adds the stack instances to the specified region within the member account of Folder 2.

  • Scenario 2: A member account is added to a folder.

    If you enable automatic deployment for a stack group whose folder contains stack instances when Account A is added to the folder, ROS creates the stack instances in a specified region within Account A. If you add Account B to the folder when the stack instances are being created within Account A, ROS continues to create the stack instances within Account A. Then, ROS creates the stack instances in a specified region within Account B.

Note You can enable automatic deployment only for stack groups. You cannot enable automatic deployment for folders, member accounts, and regions.

Procedure

  1. Log on to the ROS console.
    Note The logon account must be the same as the account within which you create the stack group.
  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. Click the name of the stack group for which you want to enable automatic deployment.
  5. Click the Stack Group Information tab. In the Deployment Configurations section, click Edit Automatic Deployment.
  6. In the Edit Automatic Deployment dialog box, set Automatic Deployment to Enabled and specify Account Removal Behavior.
    For more information about automatic deployment and account removal, see Parameters.
    Notice If you set Account Removal Behavior to Retain Stacks, the stack that corresponds to the stack instance and the relevant resources are retained when you delete the stack instance from the stack group. In this case, the resources remain unchanged. However, the resources no longer belong to the stack group. You cannot associate the stack with this stack group or a new stack group.
  7. Click Save.