Choosing a Compartment

Compartments help you organize and control access to your resources. A compartment is a collection of related resources (such as cloud networks, compute instances, or block volumes) that can be accessed only by those groups that have been given permission by an administrator in your organization. For example, one compartment could contain all the servers and storage volumes that make up the production version of your company's Human Resources system. Only users with permission to that compartment can manage those servers and volumes.

In this tutorial you use one compartment for all your resources. When you are ready to create a production environment you will most likely separate these resources in different compartments.

Before You Begin

Sign in to the Console.

Choosing a Compartment

To begin working with a service, you must first select a service, and then select a compartment that you have permissions in.

  1. In this tutorial, the first resource you create is the cloud network. Open the navigation menu, click Networking, and then click Virtual cloud networks.
  2. Select the Sandbox compartment (or the compartment designated by your administrator) from the list on the left, as shown in the image. If the Sandbox compartment does not exist, you can create it as described in Creating a Compartment.

    Selecting the Sandbox compartment

Creating a Compartment
  1. Open the navigation menu and click Identity & Security. Under Identity, click Compartments.
  2. Click Create Compartment.
  3. Enter the following:
    • Name: Enter "Sandbox".
    • Description: Enter a description (required), for example: "Sandbox compartment for the getting started tutorial".
    • Parent Compartment: Select the compartment you want this compartment to reside in. Defaults to the root compartment (or tenancy).
  4. Click Create Compartment.

    Your compartment is displayed in the list.

  5. Return to Choosing a Compartment.

When you select the Sandbox compartment, you will only see resources that are in the Sandbox. When you create new resources you will be prompted to choose the compartment to create them in, but your current compartment will be the default. If you change compartments, you must come back to the Sandbox compartment to see the resources that were created there.