OCI - Creating Compartments and Sub Compartments

Creating Compartments and Sub Compartments in Oracle Cloud Infrastructure (OCI)
Disclaimer:

There are lots of wrong and right articles in internet, when you try to execute Hands-on Labs by yourself, there is chance that you could get drifted away or get severely confused, We strictly adhere to Official Oracle Cloud Documentation, offering you reliable and precise information without personal interpretations. This means you can trust our content 100% Genuine.

Prerequisites

Before you start the Lab kindly ensure that you have the following:

  • An active OCI account.
  • Make sure you Loged in as Account user who has, necessary IAM policies to create and manage networking components and Resources.

Lab Task :

Creating Compartments in Oracle Cloud Infrastructure (OCI)

Lab Task Flow

Detailed Video Explanation of this Lab:

Required concept knowledge

    Note:

    Remember, after creating a compartment, you need to write at least one policy for it, otherwise no one can access it (except administrators or users who have permissions set at the tenancy level).

    What is a Compartment?

    A compartment in OCI is a fundamental element of Oracle Cloud Infrastructure’s security and organization model.

    • Compartments are essentially logical groups that contain related resources.
    • They are not tied to any specific data center and can span all data centers.
    • They stretch out to all OCI regions within a given tenancy, This means when you create a compartment, it is available in every region that your tenancy is subscribed to.
    • Compartments provide a global logical namespace where policies can be enforced, similar to folders in a file system.

    Here are some key benefits of using compartments:

    • Access Control: Compartments allow you to organize your resources so you can delegate cost controls and administrative access. After creating a compartment, you need to write at least one policy for it, otherwise no one can access it (except administrators or users who have permissions set at the tenancy level).
    • Resource Organization: Compartments help you organize and control access to your resources. They allow you to divide the resources into logical groups that help you organize and control access to your resources.
    • Cost Management: you can divide cost centers by compartment, it becomes easy to trace.

    Default Root Compartment

    By default, any OCI tenancy has a default root compartment, named after the tenancy itself. The tenancy administrator (default root compartment administrator) is any user who is a member of the default Administrators group.

    Once compartments are created, they can be assigned their own administrators who can then create sub-compartments and assign delegated administrators to each of them.

    Sub Compartments

    OCI supports up to a 6-level deep compartment hierarchy and the administrator of a parent compartment has full powers over its children compartments.

    Conclusion

    In conclusion, compartments in OCI are a powerful tool for managing your cloud resources. They provide a way to organize resources, control access, and manage costs.

Post a Comment