Creating a Compartment
Create compartments in an IAM tenancy to organize and isolate your cloud resources.
When creating a compartment, you must provide a name for it that's unique within its parent compartment, with a maximum 100 characters, including letters, numbers, periods, hyphens, and underscores. You must also provide a description, which is a nonunique, changeable description for the compartment, from 1 to 400 characters. Oracle also assigns the compartment a unique ID called an Oracle Cloud ID (OCID). For more information, see Resource Identifiers.
You can create subcompartments in compartments to create hierarchies up are six levels deep, as shown in the following Console image.
You might also want to write a policy for the compartment. See Creating a Policy. Use the create command and required parameters to create a compartment:
oci iam compartment create [OPTIONS]
For a complete list of parameters and values for CLI commands, see the CLI Command Reference.
Run the CreateCompartment operation to create a compartment.