Using OCI CLI to generate report for all the Boot Volumes Backup Policy Assigned and Not Assigned
This bash script needs the tenancy ID to be updated. It loops through all the compartments and then it all availability-domain, then fetches the boot volume details. From the boot volume, it fetches the asset-id and then validates block volume policy assignment. If there is no policy assigned then the policy status is marked as NOT ASSIGNED. If you intend to have backups enabled, create a new backup policy of your choice or assign an already existing one. You can use the Not Assigned Policy file to assign a backup policy in one go. The script for the same will be published in the next Blog. Stay tuned.. ========================================================== ociCompartmentList=$(oci iam compartment list --compartment-id ocid1.tenancy.oc1..aaaaaaaaaaaaaa) for c in $(echo "$ociCompartmentList" | jq '.data | keys | .[]') do compartment_ocid=$(echo "$ociCompartmentList" | jq -r ".data[$c].\"id\"") ociadList=$(oci iam av...