oci-cli icon indicating copy to clipboard operation
oci-cli copied to clipboard

List compartments in subtree from compartment other than root

Open twmcelroy opened this issue 3 years ago • 0 comments

When using [list compartments] (https://docs.oracle.com/en-us/iaas/tools/oci-cli/2.16.0/oci_cli_docs/cmdref/iam/compartment/list.html) with compartment-id-in-subtree is enabled, root/tenancy is required for the compartment ID. This can be limited with the access level accessible flag, but if a user has access to multiple parent compartments, then more compartments than needed will be pulled. This can have a downstream affect if this builds a compartment list to use for other lists (instances, volumes, etc.).

In summary, can a different compartment ID than root be used with compartment-id-in-subtree? That way it only traverses one parent compartment instead of all?

twmcelroy avatar Apr 09 '21 18:04 twmcelroy