Summary
Fault domains are nested within availability domains which are restricted by compartments. Fault domain is needed for compute instance creation.
References
Find All Fault Domains in an Availability Domain
To find all fault domains in the first available AD (Availability Domain) in the Sandbox compartment, run the following commands:
export sandbox_ocid=$( \ oci iam compartment list \ --name 'Sandbox' \ --query 'data[0].id' \ --raw-output \ ) export ad_name=$( \ oci iam availability-domain list \ --compartment-id $sandbox_ocid \ --query 'data[0].name' \ --raw-output \ ) oci iam fault-domain list \ --query 'data[*].{"FD Name":name, OCID:id}' \ --compartment-id $sandbox_ocid \ --availability-domain $ad_name \ --output table
Sample output is:
+----------------+-------------------------------------------------------------------------------------+ | FD Name | OCID | +----------------+-------------------------------------------------------------------------------------+ | FAULT-DOMAIN-1 | ocid1.faultdomain.oc1..aaaaaaaahp53nvbt2c4iq33prfpnlm4gjy3gzicruq7xp7jcsity2aeusnbq | | FAULT-DOMAIN-2 | ocid1.faultdomain.oc1..aaaaaaaatg7qy2ohk4akxhdftydwkmnsh42xmw2pgqds5uscfvzv2wib6q5a | | FAULT-DOMAIN-3 | ocid1.faultdomain.oc1..aaaaaaaaxiyzfmwllq2k32orhwnuhybcplusiwgjbj46e74ju7rpzey4wv5q | +----------------+-------------------------------------------------------------------------------------+