Use consistent naming conventions for all Azure resources to ensure clarity, manageability, and compliance with best practices. A well-defined naming convention should help identify the resource type, its associated workload, environment, and location.
Apply naming patterns consistently across all environments and stages to maintain predictability and ease of management. Consistency in naming helps in resource identification, management, and automation.
rg-acctlookupsvc-shared-prod-westus-001vnet-prod-westus-001pip-sharepoint-prod-westus-001For detailed guidance on constructing Azure naming conventions, refer to the Azure Cloud Adoption Framework (CAF). For standardized abbreviations and further guidance on Terraform resource naming, see the Recommended abbreviations for Azure resource types.
[^ table of contents ^](#table-of-contents)
Use consistent naming conventions for Terraform resources, variables, and outputs to ensure clarity and maintainability across your Terraform configurations. Terraform symbolic names should be descriptive yet concise, reflecting the purpose and type of resource they represent.
name or id rather than resource-specific terms like vnet_name or keyvault_id. This approach ensures that variables and outputs are generic and reusable, making the codebase easier to maintain and extend. For example:
name instead of vnet_name or keyvault_nameid instead of vnet_id or keyvault_idazurerm_virtual_network.this for a general-purpose virtual network resource.azurerm_role_assignment.network_contributor_on_vnet for a role assignment specific to network contributors on a virtual network.azurerm_virtual_network.externalazurerm_virtual_network.external.name instead of azurerm_virtual_network.external.vnet_nameazurerm_virtual_network.external.id instead of azurerm_virtual_network.external.vnet_id[^ table of contents ^](#table-of-contents)