54_1 ‐ OCI Tagging Concepts and Implementation - SanjeevOCI/Ocidocs GitHub Wiki

OCI Tagging Concepts and Implementation

This guide explains how to create and use tags in Oracle Cloud Infrastructure (OCI) to better manage and organize resources. Includes steps for creating tag namespaces, tag keys, and recommended practices.


1. Navigate to Tag Namespaces

  1. Open the OCI Console.
  2. Go to Governance & Administration → Tag Namespaces.
  3. Select your compartment and click Create Tag Namespace.

Tag Namespace Navigation


2. Create a Tag Namespace

  1. Provide a name, description, and compartment.
  2. Click Create Tag Namespace.

Create Namespace


3. Add a Tag Key Definition

  1. Open the created namespace.
  2. Click Create Tag Key Definition.
  3. Fill in:
    • Tag Key (e.g., Environment)
    • Description
    • Tag Value Type (Free-form, List of Values, Static)

Create Tag Key Tag Key Options


4. Choose Tag Value Options

  • Free-form: Any value can be entered.
  • List of Values: Predefined list of valid values.
  • Static: Fixed value.

Tip: Prefer list of values to enforce consistency; use underscores for static values.

Value Options Example Values


5. Review and Create

Review your selections and click Create.

Review Tag Tag Created


6. Applying Tags to Resources

  1. Navigate to a resource (e.g., Compute Instance, VCN).
  2. Under Tags, select the namespace and key, and choose a value.

Apply Tag Tag Field Example Applied


7. Managing Tags

  • Edit or delete tag key definitions as needed.
  • Monitor usage through Governance reports.

Manage Tags Tag Guidelines


8. Practical Guidelines

  • Use list of values wherever possible for uniformity.
  • For static values, prefer underscores over spaces.
  • Create meaningful tag names that reflect your organizational policies.

Best Practices Policy View


9. Tagging Across Compartments and Resources

Tags can be used across various compartments and resources to maintain cost visibility, ownership, and lifecycle management.

Cross Compartment Tag Overview