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
-
Log in to the Resource Orchestration Service console.
-
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 -
Mark the VPC as a dirty resource.
-
In the navigation pane on the left, click Stacks.
-
In the top navigation bar, select the region where you want to create the stack, such as China (Hangzhou).
-
On the Stacks page, find your stack and click Update in the Actions column.
-
On the Configure Stack Settings page, expand the More Configurations section. In the Dirty Resources field, select Vpc.
-
Click Modify. The VPC will be deleted and recreated, and its physical ID will change.
-