All Products
Search
Document Center

Resource Orchestration Service:Detect drift on a resource

Last Updated:Jan 29, 2024

Resource Orchestration Service (ROS) provides the drift detection feature that can help you check whether a resource has drifted from its expected template configurations. This topic describes how to detect drift on a resource.

Scenario

If you want to check whether the actual configurations are inconsistent with the template configurations of a specific resource in a stack, you can use the drift detection feature to detect drift on the resource.

Prerequisites

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

Limits

You can detect drift only on resources of specific types. 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, find the stack that you want to manage and click the stack ID.

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

  5. In the Resource Drift Status section, find the resource that you want to detect drift and click Detect Resource Drift in the Actions column.

  6. In the Resource Drift Status section, click View Drift Details in the Actions column of the resource to view the Physical ID, Drift Status, Type, Last Drift Detection Time parameters.

Detect drift on a resource by using Alibaba Cloud CLI

  1. Install Alibaba Cloud CLI.

    For more information, see Windows.

  2. Configure an Alibaba Cloud credential.

    For more information, see Configure a credential in interactive mode (fast).

  3. Detect drift on a resource.

    Run the aliyun ros DetectStackResourceDrift command to detect drift on the resource that you want to manage.

    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