Detecting Drift in a Stack
Detect drift in a stack in Resource Manager. Drift is the difference between the actual, real-world state of your infrastructure and the stack's last executed configuration.
Common reasons for drift include a team member adding a production tag to your resources or deleting a resource.
You can detect drift for new stacks created from compartments or for stacks where the last job run was Apply or Import state. When detecting drift, you can specify all resources or selected resources.
After detecting drift, list the drift status for resources. See Listing Drift Status for a Stack.
A work request is started. When the work request is complete, the drift status appears on the stack's details page, in the Stack information section.
To monitor the operation or investigate a failure, open the work request and view its logs. See Getting Logs for a Work Request and Getting Log Content for a Work Request.
Use the
oci resource-manager stack detect-driftcommand and required parameters to detect drift in a stack.oci resource-manager stack detect-drift stack-id <stack_OCID>Tip
Store the work request OCID returned for this asynchronous operation. Use it to retrieve work request details, error messages, log entries, or raw log content. See Getting Logs for a Work Request.For a complete list of parameters and values for CLI commands, see the Command Line Reference for Resource Manager.
Use the DetectStackDrift operation to detect drift.
Tip
Use the work request OCID returned by the operation to retrieve log entries or raw log content. See Getting Logs for a Work Request.