您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

资源命名和标记决策指南Resource naming and tagging decision guide

除非只有简单的部署,否则,组织基于云的资源是 IT 部门至关重要的任务。Organizing cloud-based resources is a crucial task for IT, unless you only have simple deployments. 出于以下原因,请使用命名和标记标准来组织资源:Use naming and tagging standards to organize your resources for these reasons:

  • 资源管理: IT 团队需要快速找到与特定工作负荷、环境、所有权组或其他重要信息关联的资源。Resource management: Your IT teams will need to quickly locate resources associated with specific workloads, environments, ownership groups, or other important information. 组织资源对于分配组织角色和访问权限以便进行资源管理非常重要。Organizing resources is critical to assigning organizational roles and access permissions for resource management.

  • 成本管理和优化: 若要使业务组知道云资源消耗情况,则需要 IT 部门了解每个团队正在使用的资源和工作负荷。Cost management and optimization: Making business groups aware of cloud resource consumption requires IT to understand the resources and workloads each team is using. 与成本相关的标记支持以下主题:The following topics are supported by cost-related tags:

  • 操作管理: 对于操作管理团队而言,与满足业务承诺和 SLA 相关的数据可见性是正在进行的操作的一个重要方面。Operations management: Visibility for the operations management team regarding business commitments and SLAs is an important aspect of ongoing operations. 若要进行良好管理,需要标记任务关键性To be well-managed, tagging for mission criticality tagging is a requirement.

  • 安全性: 数据和安全影响的分类是在出现违规或其他安全问题时供团队使用的关键数据点。Security: Classification of data and security impact is a vital data point for the team, when breaches or other security issues arise. 为了安全地操作,需要标记数据分类To operate securely, tagging for data classification is required.

  • 治理和法规符合性: 跨资源维护一致性有助于识别与议定策略之间的偏差。Governance and regulatory compliance: Maintaining consistency across resources helps identify deviation from agreed-upon policies. 资源标记的规范性指导演示了下面的一种模式如何在部署治理方案时提供帮助。Prescriptive guidance for resource tagging demonstrates how one of the following patterns can help when deploying governance practices. 类似模式可供用于使用标记来评估法规符合性。Similar patterns are available to evaluate regulatory compliance using tags.

  • 自动化: 除了使 IT 可以更方便地管理资源,合适的组织方案还使你可以在资源创建、操作监视和 DevOps 流程创建过程中利用自动化。Automation: In addition to making resources easier for IT to manage, a proper organizational scheme allows you to take advantage of automation as part of resource creation, operational monitoring, and the creation of DevOps processes.

  • 工作负荷优化: 标记有助于识别模式并解决广泛的问题。Workload optimization: Tagging can help identify patterns and resolve broad issues. 标记还有助于识别支持单个工作负荷所需的资产。Tag can also help identify the assets required to support a single workload. 将与每个工作负荷关联的所有资产进行标记可以更深入地分析任务关键型工作负荷,以做出合理的体系结构决策。Tagging all assets associated with each workload enables deeper analysis of your mission-critical workloads to make sound architectural decisions.

标记决策指南Tagging decision guide

以图表方式显示了从复杂性最低到复杂性最高的标记选项(与下面的跳转链接相对应)

跳转到:基线命名约定 | 资源标记模式 | 了解详细信息Jump to: Baseline naming conventions | Resource tagging patterns | Learn more

标记方法可以简单或复杂,其重点从支持管理云工作负载的 IT 团队到集成与业务各个方面相关的信息。Your tagging approach can be simple or complex, with the emphasis ranging from supporting IT teams managing cloud workloads to integrating information relating to all aspects of the business.

由 IT 部门调整的标记重点(如基于工作负载、应用程序、功能或环境的标记)降低了监视资产的复杂性,并使基于操作需求的管理决策更加容易。An IT-aligned tagging focus, such as tagging based on workload, application, function, or environment, reduces the complexity of monitoring assets and simplifies making management decisions based on operational requirements.

包括业务协调重点(如核算、业务所有权或业务关键性)的标记方案可能投入更多时间来创建反映企业利益的标记标准,并随着时间推移而维护这些标准。Tagging schemes that include a business-aligned focus, such as accounting, business ownership, or business criticality may require a larger time investment to create tagging standards that reflect business interests and maintain those standards over time. 这项投资产生了一个标记系统,可优化整个企业的 IT 资产成本和价值核算。This investment yields a tagging system that provides improved accounting for costs and value of IT assets to the overall business. 资产业务价值与其运营成本的这种关联是改变更广泛组织中 IT 对成本中心的认知的首要步骤之一。This association of an asset's business value to its operational cost is one of the first steps in changing the cost center perception of IT within your wider organization.

基线命名约定Baseline naming conventions

标准化命名约定是组织云托管资源的起点。A standardized naming convention is the starting point for organizing your cloud-hosted resources. 通过结构合理的命名系统可以快速标识资源以便用于管理和计帐。A properly structured naming system allows you to quickly identify resources for both management and accounting purposes. 如果组织的其他部门有现有的 IT 命名约定,请考虑云命名约定是否应与它们保持一致,或是否应建立单独的基于云的标准。If you have existing IT naming conventions in other parts of your organization, consider whether your cloud naming conventions should align with them or if you should establish separate cloud-based standards.

备注

命名规则和限制因 Azure 资源而异。Naming rules and restrictions vary per Azure resource. 命名约定必须符合这些规则。Your naming conventions must comply with these rules.

资源标记模式Resource tagging patterns

对于比只能提供一致命名约定更复杂的组织,云平台支持标记资源的功能。For more sophisticated organization than a consistent naming convention only can provide, cloud platforms support the ability to tag resources.

标记是附加到资源的元数据元素。Tags are metadata elements attached to resources. 标记由键/值字符串对组成。Tags consist of pairs of key/value strings. 包含在这些对中的值由你决定,但是作为全面的命名和标记策略的一部分,应用一致的全局标记集是整体治理策略的关键部分。The values you include in these pairs is up to you, but the application of a consistent set of global tags, as part of a comprehensive naming and tagging policy, is a critical part of an overall governance policy.

在规划过程中,请使用以下问题来帮助确定资源标记需要支持的信息类型:As part of your planning process, use the following questions to help determine the kind of information your resource tags need to support:

  • 命名和标记策略是否需要与公司内的现有命名和组织策略集成?Does your naming and tagging policies need to integrate with existing naming and organizational policies within your company?
  • 是否会实现退款或报销计帐系统?Will you implement a chargeback or showback accounting system? 是否需要将资源与部门、业务组和团队的核算信息更详细地关联起来,而不是使用简单的订阅级别细分?Will you need to associate resources with accounting information for departments, business groups, and teams in more detail than a simple subscription-level breakdown allows?
  • 标记是否需要表示资源的详细信息(如法规符合性要求)?Does tagging need to represent details such regulatory compliance requirements for a resource? 操作详细信息(如运行时间要求、修补计划或安全要求)怎么样?What about operational details such as uptime requirements, patching schedules, or security requirements?
  • 基于中心化 IT 策略的所有资源需要哪些标记?What tags will be required for all resources based on centralized IT policy? 哪些标记是可选的?What tags will be optional? 是否允许个别团队实施自己的自定义标记方案?Are individual teams allowed to implement their own custom tagging schemes?

下面列出的常见标记模式提供了如何使用标记来组织云资产的示例。The common tagging patterns listed below provide examples of how tagging can be used to organize cloud assets. 这些模式不会相互排斥,可以并行使用,它们提供了根据公司的需求组织资产的多种方式。These patterns are not meant to be exclusive and can be used in parallel, providing multiple ways of organizing assets based on your company's needs.

标记类型Tag type 示例Examples 说明Description
功能Functional app = catalogsearch1
tier = web
webserver = apache
env = prod
env = staging
env = dev
按照资源在工作负荷中的用途、它们部署到的环境或是其他功能和操作详细信息对资源进行分类。Categorize resources in relation to their purpose within a workload, what environment they've been deployed to, or other functionality and operational details.
分类Classification confidentiality = private
SLA = 24hours
对资源进行分类(按照资源的使用方式和对资源应用的策略)。Classifies a resource by how it's used and what policies apply to it.
计帐Accounting department = finance
program = business-initiative
region = northamerica
允许资源与组织中的特定组相关联,以便进行计费。Allows a resource to be associated with specific groups within an organization for billing purposes.
合作关系Partnership owner = jsmith
contactalias = catsearchowners
stakeholders = user1;user2;user3
提供有关与资源相关或受资源影响的人员(IT 外部)的信息。Provides information about what people (outside of IT) are related or otherwise affected by the resource.
目的Purpose businessprocess = support
businessimpact = moderate
revenueimpact = high
使资源与业务功能保持一致,以更好地支持投资决策。Aligns resources to business functions to better support investment decisions.

了解详细信息Learn more

有关 Azure 中的命名和标记的详细信息,请参阅:For more information about naming and tagging in Azure, see:

后续步骤Next steps

资源标记只是云采用过程中需要体系结构决策的核心基础结构组件之一。Resource tagging is just one of the core infrastructure components requiring architectural decisions during a cloud adoption process. 访问架构决策指南概述,了解在为其他类型的基础结构制定设计决策时使用的替代模式或模型。Visit the architectural decision guides overview to learn about alternative patterns or models used when making design decisions for other types of infrastructure.