Checks whether a resource has all the specified tags.
Scenario
Cloud-based IT management requires that each resource have one or more specified tags. These tags are used for the subsequent management of resources, such as permission isolation, bill splitting, and automatic O&M.
For example, Enterprise A requires that all resources in the cloud have the tag Project=xx
, in which Project
is the key of the tag and xx
is the value of the tag. The value of the tag can be the name of an existing project of Enterprise A. For example, the tag can be Project=A, Project=B, or Project=C
. The costs of each project in the cloud are calculated based on the tags of resources. Therefore, each resource must have at least one of the specified tags. The key and value of a tag must be in the specified range.
Risk level
Default risk level: high.
You can change the risk level as required when you apply this rule.
Compliance evaluation logic
If a resource has all the specified tags, the evaluation result is compliant.
NoteYou can define at most six tags in the rule. The resource is evaluated to be compliant only if the resource has all the specified tags.
If a resource does not have all the specified tags or has tags that are not included in the specified tags, the evaluation result is non-compliant. For more information about how to correct the non-compliant configuration, see Non-compliance remediation.
Rule details
Item | Description |
Rule name | required-tags |
Rule ID | required-tags |
Tag | ECS and Tag |
Automatic remediation | Supported |
Trigger type | Configuration change |
Supported resource type |
|
Input parameter |
Note You can define at most six tags. Each tag must contain a key and a value. |
Non-compliance remediation
Add the specified tags to the resource on the Tags page in the Resource Management console. For more information, see Add a custom tag.
Add the specified tags to the resource in the Cloud Config console. For more information, see Configure template remediation or Configure custom remediation.