Skip to content

Commit ff45321

Browse files
authored
Customer bug report. Fix OCI command for sub compartments (#975)
1 parent 6834e1b commit ff45321

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

workshops/oracleAQ/setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ TNS_WALLET_STR="(MY_WALLET_DIRECTORY="$TNS_ADMIN")"
3030
#Create compartment
3131
ROOT_COMPARTMENT_OCID=$(oci iam compartment list --all --compartment-id-in-subtree true --access-level ACCESSIBLE --include-root --raw-output --query "data[?contains(\"id\",'tenancy')].id | [0]")
3232

33-
if [[ -z $(oci iam compartment list --all | jq -r ".data[] | select(.name == \"${COMPARTMENT}\") | .id") ]]; then
33+
if [[ -z $(oci iam compartment list --all --compartment-id-in-subtree true | jq -r ".data[] | select(.name == \"${COMPARTMENT}\") | .id") ]]; then
3434
oci iam compartment create --name ${COMPARTMENT} -c ${ROOT_COMPARTMENT_OCID} --description "Oracle Advanced Queue workflow" --wait-for-state ACTIVE
3535
echo "COMPARTMENT '${COMPARTMENT}' CREATED."
3636
else

0 commit comments

Comments
 (0)