{"id":13,"date":"2025-09-23T12:48:28","date_gmt":"2025-09-23T10:48:28","guid":{"rendered":"http:\/\/158.180.13.86\/?p=13"},"modified":"2025-09-23T12:48:28","modified_gmt":"2025-09-23T10:48:28","slug":"cloud-shell-oci-cli-configuration","status":"publish","type":"post","link":"http:\/\/www.onados.nl\/index.php\/2025\/09\/23\/cloud-shell-oci-cli-configuration\/","title":{"rendered":"Cloud shell: OCI CLI configuration"},"content":{"rendered":"\n<p>The CLI in the cloud shell uses environment variables for its configuration:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">env | grep OCI<\/pre>\n\n\n\n<p>The relevant entries are:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">OCI_CLI_CONFIG_FILE = \/etc\/oci\/config<br>OCI_CLI_PROFILE = eu-amsterdam-1<\/pre>\n\n\n\n<p>Now, create the  oci-cli-rc file:<\/p>\n\n\n\n<p><code>oci setup oci-cli-rc<\/code><\/p>\n\n\n\n<p>Edit the file: <code>~\/.oci\/oci_cli_rc<\/code><br>Create a section with the name taken from the <code>OCI_CLI_PROFILE<\/code> variable:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[eu-amsterdam-1]<br>compute.compartment-id = ocid1.compartment.oc1..xyz<\/pre>\n\n\n\n<p>And test if it works:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">oci compute instance list OID<\/pre>\n\n\n\n<p>Name of availability domain: PvAq:eu-amsterdam-1-AD-1 [to discover: Create a new VM instance]<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The CLI in the cloud shell uses environment variables for its configuration: env | grep OCI The relevant entries are: OCI_CLI_CONFIG_FILE = \/etc\/oci\/configOCI_CLI_PROFILE = eu-amsterdam-1 Now, create the oci-cli-rc file: oci setup oci-cli-rc Edit the file: ~\/.oci\/oci_cli_rcCreate a section with the name taken from the OCI_CLI_PROFILE variable: [eu-amsterdam-1]compute.compartment-id = ocid1.compartment.oc1..xyz And test if it works: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-13","post","type-post","status-publish","format-standard","hentry","category-oracle-cloud-infrastructure"],"_links":{"self":[{"href":"http:\/\/www.onados.nl\/index.php\/wp-json\/wp\/v2\/posts\/13","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.onados.nl\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.onados.nl\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.onados.nl\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.onados.nl\/index.php\/wp-json\/wp\/v2\/comments?post=13"}],"version-history":[{"count":5,"href":"http:\/\/www.onados.nl\/index.php\/wp-json\/wp\/v2\/posts\/13\/revisions"}],"predecessor-version":[{"id":21,"href":"http:\/\/www.onados.nl\/index.php\/wp-json\/wp\/v2\/posts\/13\/revisions\/21"}],"wp:attachment":[{"href":"http:\/\/www.onados.nl\/index.php\/wp-json\/wp\/v2\/media?parent=13"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.onados.nl\/index.php\/wp-json\/wp\/v2\/categories?post=13"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.onados.nl\/index.php\/wp-json\/wp\/v2\/tags?post=13"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}