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

ENH: consider adding a convenience command or simple means to retrieve the tenancy_ocid

Open jeliker opened this issue 4 years ago • 0 comments

Consider adding a simple way to get the tenancy_ocid based on the configured SDK credentials.

I am regularly doing something like this:

oci os-management software-source list

…which requires the tenancy OCID as input. I resort to something like this:

oci os-management software-source list $(oci iam group list --raw-output --query 'data[0]."compartment-id"')

…and am surprised there isn't a way to either default to the tenanc_ocid from the ~/.oci/config file or otherwise easily get the tenancy_ocid otherwise. I would expect oci iam tenancy command to offer that value but, alas, it ALSO requires the tenancy ID as input.

jeliker avatar Oct 15 '21 18:10 jeliker