Mark dirty resources

更新时间:
复制 MD 格式

Mark a resource as dirty to delete and recreate it without modifying the template. The physical ID of the resource changes after recreation.

Background information

You can mark a resource as dirty to trigger its deletion and recreation without modifying the template. The physical ID changes after recreation. The following procedure uses an ALIYUN::ECS::VPC resource as an example.

Procedure

  1. Log in to the Resource Orchestration Service console.

  2. Create a stack that contains a VPC.

    Use the following template to create a stack that contains an ALIYUN::ECS::VPC resource.

    To create a stack, see Create a stack.

    ROSTemplateFormatVersion: '2015-09-01'
    Resources:
      Vpc:
        Type: ALIYUN::ECS::VPC
        Properties:
          VpcName: MyTestVpc
  3. Mark the VPC as a dirty resource.

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

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

    3. On the Stacks page, find your stack and click Update in the Actions column.

    4. On the Configure Stack Settings page, expand the More Configurations section. In the Dirty Resources field, select Vpc.

    5. Click Modify. The VPC will be deleted and recreated, and its physical ID will change.