What happens to the resources inside a compartment when you delete the compartment itself?
Oracle Cloud Infrastructure enforces a strict structural dependency that prevents the deletion of any compartment while it still contains active child resources. To satisfy this prerequisite, you must manually terminate every contained resource or migrate them to an alternative compartment using the console or API. Only when the resource count drops to zero does the API permit the parent compartment deletion request to proceed, safeguarding against accidental orphaned assets and cascading data loss.
Why this answer
OCI prevents deletion of a compartment that still contains resources. You must first delete or move every resource out of the compartment before the compartment itself can be deleted, which protects against accidental mass deletion.
Exam trap
1Z0-1072-26 often tests compartment lifecycle behavior — candidates assume cloud compartments behave like folders with cascade delete, but OCI explicitly blocks deletion until the compartment is empty.
How to eliminate wrong answers
Option A is wrong because OCI does not cascade-delete resources when a compartment is removed — this would be dangerous and is explicitly prevented. Option B is wrong because resources are not orphaned or reassigned to a tenancy admin group; they remain in the compartment and block its deletion. Option D is wrong because resources are not automatically moved to the root compartment; movement must be performed explicitly by an administrator.