This topic describes the best practice for using a tag policy in resource directory mode to standardize tag-related operations that are performed by using a member in a resource directory.
Background information
If your business in the cloud is complex and you use a resource directory to manage all your accounts, you can use the management account of the resource directory to enable the Tag Policy feature in resource directory mode. Then, you can use tag policies to manage the tag-related operations performed by using a member in the resource directory.
When you use a tag policy, we recommend that you attach the tag policy to a member that has a small number of resources to perform a test. If the test is successful, you can attach the tag policy to multiple members, a folder other than the Root folder, or the Root folder.
Use the advanced features of a tag policy
In addition to automatic detection of non-compliant tags, you can also use a tag policy to implement automatic remediation and pre-event interception of non-compliant tags, and enable automatic tag inheritance from a resource group. For information about the Alibaba Cloud services and resource types that support the advanced features, see Services that work with tag policies.
You can use the advanced features described in the following table based on your business requirements.
Advanced feature | Operation | Result | References |
Automatic tag remediation | When you create or modify a tag policy, select Automatic Remediation. | The system remediates non-compliant tags. | |
Pre-event interception | When you create or modify a tag policy, select Pre-event Interception. Pre-event interception is a pre-event method that is used to ensure tag compliance. You can use this feature in one of the following scenarios:
| When you create a resource or add tags to an existing resource, the system performs a check. If the tags defined in the tag policy are not added to the resource, the resource creation or tag addition operation fails. | |
Automatic tag inheritance from a resource group | When you create or modify a tag policy, select Automatically Inherit Tags for Resources from Resource Groups. | After you create a resource in the specified resource group or add a resource to the resource group, the resource inherits the tags that are added to the resource group. |