When we start working on Oracle Cloud Infrastructure (OCI), we begin with a root compartment, which holds all the cloud resources underneath. However, Oracle recommends creating a new compartment in the begging and don’t put all the resources on the root compartment.
In this post, we will list the steps needed to create a new compartment in Oracle Cloud Infrastructure – OCI.
Note: Every quarter, Oracle often changes the user interface to deliver better user experience to their customers, therefore, you may find a difference in the screens below. But we will try to update them reguirly as needed.
Steps to Create a Compartment in Oracle Cloud Infrastructure (OCI):
- Login to OCI (Oracle Cloud Infrastructure)
- Go to Compartment Menu
- Create a New Compartment
- Enter required compartment informations
- Verify Created Compartment
Login to OCI Oracle Cloud Infrastructure
Go to the Oracle Cloud website from here, then login
Go to Compartment Menu
Click the hamburger menu from the top lift side (1), then choose Identity & security (2), then click Compartments (3).
Create a New Compartment
After going to compartments, you will find the list of all compartments in your tenancy (fancy name of root compartment). Click on Create Compartment to create a new one.
Enter required compartment informations
Enter the following information:
- Name: Enter compartment name (Storage Compartment). (Maximum 100 characters, including letters, numbers, periods, hyphens, and underscores).
Note: Oracle assign identifier to each resource called Oracle Cloud Identifier (OCID) - Description: Enter a description for your compartment. (Required, Non-unique, Maximum 400 characters).
- Parent Compartment: Specify which parent compartment for your compartment. By default root compartment will be selected.
Note: You can create up to six level of subcompartment. - Tag Key & Value: These are optional that are used to manage the resources in your tenancy. we will talk about them later. but for now you can read more about taging from here
- Click Create Compartment button.
Verify Created Compartment
As you can see, the new compartment is created successfully. You may need to wait for a couple of seconds before seeing the new compartment.
Eventually, If you have any questions, please don’t hesitate to ask them in the comments section below. or ask your question from up right corner and an expert will reply your inquery.
Hopefully, it was clear and concise.
If you have an addition to this guide to add extra value for the readers, kindly let me know.