Resource Management is a collection of all the associated resource management services used to provide easy management of the enterprise IT administration. The services for efficient resource management in Alibaba Cloud include Resource Directory, Resource Group, Resource Sharing, and Tag. Resource Directory is used to implement account management based on the organizational structure of the enterprise. Resource Group and Tag allow us to group and manage the resources within the accounts used by the enterprise. Resource Sharing lets the users that use the accounts in the same organizational structure to share resources with each other.
In this blog, we are going to discuss how to create Tags using both Custom Tags and Predefined Tags option available in Alibaba Cloud Resource Management Service. We will also discuss how to efficiently manage resources by using the Tag policy option of Alibaba Cloud Resource Management Service.
Tags can be used for identifying cloud resources created in our Alibaba Cloud account. Tags allow us to categorize, search for, and aggregate resources that have the same characteristics from different dimensions.
The Tag service allows us to perform the following operations:
A tag consists of a tag key and a tag value. We can create tags, add them to resources, and then perform the following tasks:
A custom tag is created by a user. If multiple cloud resources that are associated with each other exist within your account, we can add custom tags to these resources to categorize the resources. we can add up to 20 custom tags to a resource.
A predefined tag is the one created in advance and is added to the cloud resources in all regions. We can create predefined tags in the stage of tag planning and add them to specific cloud resources in the stage of tag implementation. The system provides some common built-in types for preset tags. The various Creation method available for Predefined tags are
A system tag is defined by the system . We can only query system tags. System tags present data relationships in a standard manner.
Createdby tags are a type of system tag that is generated by Alibaba Cloud and automatically added to resources. Createdby tags can help you identify the creators of resources, analyze expenses and bills at a low cost, and manage cloud resources and their costs in a convenient and efficient manner.
Tag policies help us to standardize the tags that are used by the enterprise. We can use tag policies to define the tags that can be added to resources in the Alibaba Cloud account.Adding correct tags to resources improves management efficiency in scenarios such as cost allocation and automated O&M.
After we create a resource and add tags to the resource, we can use a tag policy to periodically check the following items to determine the tag compliance of the resource:
If we enable automatic remediation for tags and the remediation rules that you configure match the conditions for triggering automatic remediation, the system remediates the non-compliant tags based on the detection results.
After you add a tag to a resource group, if you create a resource in or add a resource to the resource group, the tag is automatically added to the resource.
By default, tag compliance enforcement takes effect only for tags that are defined in a tag policy. If no tags are added to a resource to which the tag policy is applied or other tags are added to the resource, tag compliance enforcement does not take effect.
Step 1: In the Resource Management Console select "Tag" option and then click "Create Custom Tags" option available as showing below
Figure-1: Tag Creation Console
Step 2: Create new custom tag with "Tag key" and "Tag value" as shown below
Figure-2: Custom Tag Creation Console
Step 3: Now select the Services/Resources to which the tag has to be added and select the resource by using options "Select from Resource List" and "Enter Resource IDs"
Figure-3: Selecting Service and Resources for Tagging
Step 4: Now we can find the custom Tag created and the resource associated with the custom tag created in the "Tags" console.
Figure-4: Custom Tag List console
Figure-5: Resource associated with the custom tag created
Step 1: In the Resource Management Console select Tag and then click "Predefined Tags" option available as showing below
Figure-1: Predefined Tag Creation Console
Step 2: Select "Customize Predefined Tag" creation method and add Tag Key, Tag Value as shown below
Figure-2: Creating Tag using Customize Predefined Tag Method
Step 3: The Predefined Tag created using Customize Predefined Tag Method can be found in the Predefined Tag Console as shown below
Figure-3: Predefined Tag List created using Customize Predefined Tag Method
Step 4: Now you can view and add the resource added to the Tag using the options "View Resources" and "Add to Resources" option as shown below
Figure-4: "View Resources" and "Add to Resources" options in Predefined Tag
Step 5: Now select the Service to which the tag has to be added and select the resource by using options "Select from Resource List" and "Enter Resource IDs"
Figure-5: Selecting Service and Resources for Tagging
Step 6: Viewing the Resource allocated to the predefined tags by using the option "View Resources" in the Tag console as shown below
Figure-6: Viewing the resource Allocated using Predefined Tags
Step 1: In the Resource Management Console select "Policy Library" and then click "Create Tag Policy" option available as showing below
Figure-1: Policy Library Console
Step 2: In the "Create Tag Policy" console provide "Policy Name", "Policy Description" and "specify the policy detail" in quick mode or JSON as shown in the below diagram
Figure-2: Create Tag Policy Console
Step 3: In "Quick Mode" option provide Tag Key, Policy Scenario, allowed label values and Policy Execution Mode as shown in the below diagram
Figure-3: providing Tag Key, Policy Scenario, allowed label values and Policy Execution Mode in "Quick Mode"
Step 4: Enable following options such as "Specify the detected resource type for this tag key", "Enforcement", "Automatic Remediation" for the resource type "Virtual Private Cloud" as shown below
Figure-4: Enabling Quick Mode options
Step 4: Create the Tag Policy by clicking the "Create" option and select "Bind Account and Enable" as shown in the below diagram.
Figure-5: Policy creation and Enabling
Step 5: Now we can view the created tag policy in the "Policy Library" Console as Shown below
Figure-6: Policy Library Console with Created Tag Policy
Step 6: We can find the effective policy by using the option "Effective Policies" in the Tag Console
Figure-7: Effective Policies Console
Step 7: We can find the Non-compliant Resources associated with the Tag policy created using the option "Detection Results" in the Tag Console.
Figure-8: Detection Results Console
Step 8: Now the Non-compliant Resources associated with the Tag policy can be made to compliant Resources by using the Repair option as shown below
Figure-9: Repair option of Detection Results Console
Step 9: In the Repair Label option choose the corresponding tag created in the tag policy and click "ok"
Figure-10: Repair Label option of Detection Results Console
Step 10: Now in the "Detection Results" console we can find that the repaired resource is excluded from the "Non-compliant Resources" list as shown below
Figure-11: Detection Results Console after adding tag by repairing option
Using Alibaba Cloud Resource Management service options such as Resource Directory, Resource Group, Resource Sharing, and Tag we can efficiently manage the resources present in our Alibaba Cloud Account. In this blog discussed how to create Tags using both Custom Tags and Predefined Tags option available in Alibaba Cloud Resource Management Service and Finally we discussed how efficiently we can manage the resources using the Tag policy option of Alibaba Cloud Resource Management Service.
Creating Business Insight Using Quick BI and an ApsaraDB for RDS Instance
Working with Resource Group in Resource Management of Alibaba Cloud
12 posts | 3 followers
FollowChenyue Gao (高晨悦) - October 28, 2021
Alibaba Cloud Community - April 7, 2023
Alibaba Clouder - April 23, 2020
Alibaba Cloud Community - February 14, 2023
Alibaba Clouder - October 13, 2020
Alibaba Clouder - April 22, 2019
12 posts | 3 followers
FollowOrganize and manage your resources in a hierarchical manner by using resource directories, folders, accounts, and resource groups.
Learn MoreA Web browser-based admin tool that allows you to use command line tools to manage Alibaba Cloud resources.
Learn MoreSecure your cloud resources with Resource Access Management to define fine-grained access permissions for users and groups
Learn MoreA configuration audit service that provides configuration history of enterprise resources in Alibaba Cloud and audits the compliance of resource configurations.
Learn MoreMore Posts by GAVASKAR S