LAB 27 ::‐ Tags ? - guptasanjeev-52/oci_docs GitHub Wiki
Tags in OCI..
Tags in OCI are metadata labels applied to cloud resources such as virtual machines, databases, storage buckets, and networks.
Each tag consists of a tag namespace, a key, and a value, allowing you to group and classify resources according to your organization's needs.
1.) It work's as a LABEL.
2.) With the help of tags we can see which service is used to created and used by which user or which Group of users.
3.) Benefits of attaching Tags...( Calculate the Cost.)
Always create Tags in Root compartment.
( If you had created a Tag in the root level then you can attach at any level of compartment services.)
So many Tags can be attached to a single services...
Types of Tags in OCI
OCI mainly provides two types of tags::-
1.) Defined Tags::- Defined Tags are tags that are created and managed by an administrator through a Tag Namespace. In simple words, the organization creates a standard list of tags that users can use.
Example 1 ::-
Environment = Production
Environment = Development
Department = Finance
Project = ABC
Example 2 ::- An administrator creates: Tag Namespace: CompanyTags Inside it: Environment Department Project Owner Users can then apply these tags to OCI resources.
Why Defined Tags are useful ::- They provide standardization and better control across the organization.
For example, instead of different users creating: Env = Prod Environment = Production environment = prod the organization can define one standard tag: Environment = Production
2.) Free-form Tags ::- Free-form Tags are simple key-value labels that users can add to OCI resources without creating a predefined tag namespace. In simple words, they are quick and flexible labels. Example::- Owner = Sanjeev Project = Testing Location = Ashburn Purpose = Demo You don't need an administrator to create a tag namespace first. Why Free-form Tags are useful They are useful when you need to quickly add information to a resource without requiring a predefined tagging structure.
Purpose of Tags in OCI
Tags can be used for several purposes ::-
1.) Resource Organization::- Tags help organize large numbers of OCI resources.
2.) Resource Identification::- They help identify what a resource is used for. Example::- Project = Banking Application
3.) Cost Management::- Tags can help identify which project, department, or team is using cloud resources. This can make cost tracking and reporting easier.
4.) Resource Management::- Tags help administrators find and manage resources more easily.
5.) Automation::- Tags can be used as information for automation and resource-management processes.
6.) Governance::- Defined Tags can help an organization maintain a consistent tagging structure.
7.) Ownership::- Tags can identify who or which team is responsible for a resource. Example::- Owner = Network Team
Benefits of Tags in OCI
Better Organization ::- Resources can be categorized according to project, department, environment, etc.
Easy Identification ::- You can quickly understand the purpose of a resource.
Better Cost Tracking ::- Tags can help associate resources with projects or departments for cost analysis.
Improved Resource Management ::- Administrators can manage large numbers of resources more efficiently.
Better Governance ::- Defined Tags help organizations maintain consistent naming and classification.
Easy Searching and Filtering ::- Tags make it easier to locate resources based on their assigned information.
Automation Support ::- Tag-based information can be used to support automated resource-management activities.
creating Tags & Using it...
Firstly , Log in to OCI and proceed further step by step...
Burger menu >> Governance & Administration >> Tag Namespaces
Select the Root compartment always...
Click Create tag namespace
Enter Details >> Select compartment >> Namespace name >> Description >> Click create
Created
Click on the namespace name
Enter Tag Key Details Name >> Description...
Always turn on Cost tracking ::- Cost-tracking tags are passed to the billing system to allow you to filter your bill and view usage by tag.
Tag Value Type
1.) Static Value...
**A Static Value means the tag has a fixed value, which is automatically assigned and cannot be changed by users.** (Rare used)
2.) A List of Values...
** A List of Values allows users to select one value from a predefined list.** ( Always )
Click on Create
Apply Defined Tags to Resource...
Burger menu >> Compute >> Instances >> Open instance >> Click Tags
Add Defined Tag >> Select Namespace >> Select Key >> Select Value >> Click Add Tag