refactor: centralize Azure resource naming with abbreviations.json and update Bicep templates #1795
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
This pull request introduces a significant update to the infrastructure codebase, primarily focusing on the centralization and standardization of resource naming conventions through the use of abbreviations. It also includes adjustments to parameter definitions and resource configurations to align with the new naming scheme.
Centralized Resource Naming with Abbreviations:
abbreviations.json
file to define standardized abbreviations for various resource types across categories such as AI, compute, databases, and networking. This enables consistent and concise naming conventions for resources. (infra/abbreviations.json
)Refactoring Resource Names:
infra/main.bicep
to use the abbreviations fromabbreviations.json
. Examples include:cosmos-${resourceToken}
with${abbrs.databases.cosmosDBDatabase}${resourceToken}
for Cosmos DB.openai-${resourceToken}
with${abbrs.ai.openAIService}${resourceToken}
for Azure OpenAI resources.kv-${resourceToken}
with${abbrs.security.keyVault}${resourceToken}
for Key Vault.Parameter Adjustments:
miName
ininfra/core/security/managed-identity.bicep
and passed it explicitly from the main module using the new abbreviation-based approach. [1] [2]Code Simplification:
infra/main.bicep
) [1] [2]This refactor enhances consistency, readability, and scalability of the infrastructure codebase by leveraging a single source of truth for resource abbreviations.
Does this introduce a breaking change?
How to Test
What to Check
Verify that the following are valid
Other Information