LAB 30 (TAGS) - arunsinghchauhan38-arch/CLOUDARCHITECTDOC GitHub Wiki
TAGS
Tags in Oracle Cloud Infrastructure (OCI) are metadata labels attached to resources that help with organization, governance, cost management, and automation. They are critical for large-scale cloud environments because they enable consistent tracking, reporting, and policy enforcement across compartments and services.
🏷️ What Tags Are in OCI
Tags in OCI are metadata labels you attach to resources (instances, buckets, VCNs, etc.). They’re defined in tag namespaces and can be:
-
Free-form tags → simple key-value pairs, flexible but not enforced.
-
Defined tags → centrally created by administrators, enforce consistency, and can be required by policies.
🔖 Detailed Breakdown of Defined tags
1. Flip Tag
-
Purpose: Acts like a toggle or switch.
-
Usage: Often used to mark whether a resource is billable vs non-billable, active vs inactive, or eligible vs ineligible for automation.
Example:
-
Flip: "On" → Resource is included in nightly shutdown automation.
-
Flip: "Off" → Resource is excluded.
2. App Owner Tag
-
Purpose: Identifies the application owner or responsible team.
-
Usage: Helps with accountability, incident response, and chargeback.
Example:
-
AppOwner: "PaymentsTeam"
-
AppOwner: "AnalyticsDept"
-
This ensures every resource has a clear owner, preventing “orphaned” resources.
3. Env Tag (Environment Tag)
-
Purpose: Classifies resources by environment type.
-
Usage: Critical for governance, cost tracking, and applying policies.
-
Common Values: Dev, Test, Stage, Prod.
Example:
-
Env: "Prod" → stricter IAM policies, higher monitoring.
-
Env: "Dev" → cheaper shapes, auto-shutdown at night.
4. Business Unit Tag
-
Purpose: Associates resources with a business unit or department.
-
Usage: Enables cost allocation and reporting across divisions.
Example:
-
BusinessUnit: "Finance"
-
BusinessUnit: "HR"
-
This helps finance teams split cloud bills by department.
📊 Example of Tag Usage
Before Creating Namespace tag we must know, namespace tag always create at tenancy root level. in case we create a namespace tag under child compartment level so its bounded only in child compartment level and its not use full in case we need tag for entire tenancy.
When we create a tag namespace in OCI, the name should reflect organization’s identity rather than a project or compartment. This ensures clarity, consistency, and avoids confusion when multiple teams or business units are tagging resources.
Steps to Create Tag Namespaces
1. Go to Governance & Administration and under Tenancy management click on Tag Namespaces
2. Select root compartment and click on create tag namespaces
3. Fill the name of tag namespace as equivalent to the organization name, fill the description and click on create.
Steps to Create Tags
1. click on created tag namespace and click Create tag key definition
2. now we fill the tag key name and give description of tag key and also enable the Cost-tracking tag button. now we select the list of value option.
in this option we can create list of value and use them when we need it without facing any case sensitivity and without typos issue.
3. now create another tag for app owner
In this we create tag for the app owner and fill the name of owners.
Add tags
To add tags into the new instance or service we can go to create instance in basic information we found the tagging option. here click on add tag.
Here we can use tag as per the need and we also add multiple tags here.