You can use the change set feature to update the template and template parameters of a stack. This topic describes how to create a change set in the Resource Orchestration Service (ROS) console.

Prerequisites

A stack is created. For more information about how to create a stack, see Create a stack.

Limits

You can create change sets only for stacks that are in the following states.
State Description
CREATE_COMPLETE The stack is created.
UPDATE_FAILED The stack fails to be updated.
UPDATE_COMPLETE The stack is updated.
ROLLBACK_COMPLETE The stack is rolled back.
ROLLBACK_FAILED The stack fails to be rolled back.
IMPORT_CREATE_COMPLETE The stack is created by importing resources.
IMPORT_UPDATE_COMPLETE The stack is updated by importing resources.
IMPORT_UPDATE_FAILED The stack fails to be updated by importing resources.
IMPORT_UPDATE_ROLLBACK_COMPLETE The stack fails to be updated by importing resources but is rolled back.
IMPORT_UPDATE_ROLLBACK_FAILED The stack fails to be updated by importing resources and fails to be rolled back.
CHECK_FAILED The stack fails to be verified.
CHECK_COMPLETE The stack is verified.

Create a change set in the ROS console

  1. Log on to the ROS console.
  2. In the left-side navigation pane, click Stacks.
  3. In the upper-left corner of the page, select the region in which the stack that you want to use is deployed from the drop-down list.
  4. In the Actions column of the stack, choose 1 > Create Change Set.
    You can also click the stack ID in the Stack Name column. On the stack management page, click the Change Sets tab. Then, click Create Change Set.
  5. In the Select Template step, select an existing template or a sample template, and then click Next.
  6. In the Configure Template Parameters step, configure the Change Set Name parameter and the template parameters and then click Next.
    Note Template parameters are parsed from the template. Follow the on-screen instructions to configure the template parameters.
  7. In the Configure Change Set step, configure the following parameters based on your business requirements: Stack Policy, Rollback on Failure, Timeout Period, RAM Role, and Whether to Enable Replacement Update. Then, click Next.
  8. In the Check and Confirm step, click Create Change Set.

Create a change set by using Alibaba Cloud CLI

You can use Alibaba Cloud CLI to run the aliyun ros CreateChangeSet command to create a change set.

You must specify CREATE as the type of the change set that you want to create. You must also specify a stack name, a template, and a change set name and configure the required parameters. In the following example, a change set named test-change-set is created by using the oss://ros-templates/test-change-set.json?RegionId=cn-hangzhou stack template.

aliyun ros CreateChangeSet --TemplateURL oss://ros-templates/test-change-set.json?RegionId=cn-hangzhou --StackId <stack_id> --ChangeSetName test-change-set --Parameters.1.ParameterKey Count --Parameters.1.ParameterValue 1