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 in the Stack information tab.
Use the
oci resource-manager stack detect-drift
command and required parameters to detect drift in a stack.oci resource-manager stack detect-drift stack-id <stack_OCID>
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.