Resource Names Meet Regular Expression Requirements
Rule Details
Parameter |
Description |
---|---|
Rule Name |
regular-matching-of-names |
Identifier |
Resource Names Meet Regular Expression Requirements |
Description |
If a resource name that does not comply with regular expression requirements, this resource name is non-compliant. |
Tag |
name |
Trigger Type |
Configuration change |
Filter Type |
All resources |
Rule Parameters |
regularExpression: indicates the regular expression to be matched. % indicates any characters, and _ indicates a character. |
Application Scenarios
After a company migrates to the cloud, the number of resources created on the cloud keeps increasing. Some large enterprises may have hundreds of thousands or millions of resources. They need to standardized resource naming for effective resource governance.
Huawei Cloud recommends that you formulate unified resource naming rules to categorize resources by cloud service type and resource tag. For example:
- All IAM user names must start with hw_user_.
- All ECSs that are tagged by prod must have "Do-Not-Delete" in their names.
Solution
Name resources in compliance with a convention to facilitate routine resource management.
Rule Logic
- If the name of a resource does not match the naming convention represented by the specified regular expression, the resource is non-compliant.
- If the name of a resource matches the naming convention represented by the specified regular expression, the resource is compliant.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot