Detect drift on a resource

更新时间:
复制 MD 格式

Drift detection helps you identify whether a resource has deviated from its expected template configurations.

Scenario

You can use drift detection to check whether the actual configurations of a specific resource in a stack are inconsistent with its template configurations.

Prerequisites

Drift detection has been performed on the entire stack. For more information, see Detect drift on a stack.

Limits

Only specific resource types support drift detection. For more information, see Resource types that support drift detection and resource import.

Supported methods

Detect drift on a resource in the ROS console

  1. Log on to the ROS console.

  2. In the left-side navigation pane, click Stacks.

  3. On the Stacks page, click the ID of the target stack.

  4. On the stack details page, click the Drift tab.

  5. In the Resource Drift Status section, click Detect Resource Drift next to the resource name to check its drift status.

  6. In the Resource Drift Status section, click View Drift Details next to the resource name to view the physical ID, drift status, resource type, and last drift detection time.

Detect drift on a resource by using Alibaba Cloud CLI

  1. Install the Alibaba Cloud CLI.

    For more information, see Install Alibaba Cloud CLI.

  2. Configure Alibaba Cloud credentials.

    For more information, see Configure credentials.

  3. Detect drift on a resource.

    Run the aliyun ros DetectStackResourceDrift command to detect drift on the target resource.

    You must specify the resource name and the ID and region ID of the stack. For more information, see DetectStackResourceDrift.

    aliyun ros DetectStackResourceDrift --StackId a4dffae5-d2a5-4188-b8b5-69dbe8a2**** --LogicalResourceId Vpc --RegionId cn-beijing

References