fix: Standardize environment variable naming conventions#867
fix: Standardize environment variable naming conventions#867Prachig-Microsoft wants to merge 5 commits intodev-v4from
Conversation
- Renamed AZURE_ENV_OPENAI_LOCATION to AZURE_ENV_AI_SERVICE_LOCATION - Renamed AZURE_ENV_MODEL_NAME to AZURE_ENV_GPT_MODEL_NAME - Renamed AZURE_ENV_MODEL_VERSION to AZURE_ENV_GPT_MODEL_VERSION - Renamed AZURE_ENV_MODEL_CAPACITY to AZURE_ENV_GPT_MODEL_CAPACITY - Renamed AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID to AZURE_ENV_LOG_ANALYTICS_WORKSPACE_RID - Renamed AZURE_EXISTING_AI_PROJECT_RESOURCE_ID to AZURE_ENV_FOUNDRY_PROJECT_RID Updated 14 files across workflows, parameter files, scripts, and documentation to maintain consistency throughout the project.
There was a problem hiding this comment.
Pull request overview
This PR standardizes Azure-related environment variable names across infrastructure parameter files, deployment validation scripts, GitHub Actions workflows, and related documentation to improve consistency and clarity (notably for AI service location, GPT model settings, Log Analytics, and Foundry project resource IDs).
Changes:
- Renamed AI service region env var from
AZURE_ENV_OPENAI_LOCATIONtoAZURE_ENV_AI_SERVICE_LOCATIONacross scripts/workflows/docs. - Renamed GPT model env vars to
AZURE_ENV_GPT_MODEL_{NAME,VERSION,CAPACITY}in infra parameter mappings and docs. - Renamed resource ID env vars to
*_RIDfor Log Analytics and Foundry project across workflows, infra parameters, and docs.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| infra/scripts/validate_model_quota.sh | Updates user guidance text to reference AZURE_ENV_AI_SERVICE_LOCATION. |
| infra/scripts/validate_model_quota.ps1 | Updates user guidance text to reference AZURE_ENV_AI_SERVICE_LOCATION. |
| infra/main.waf.parameters.json | Maps standardized env var names into WAF deployment parameters. |
| infra/main.parameters.json | Maps standardized env var names into default deployment parameters. |
| docs/re-use-log-analytics.md | Updates azd env set example to AZURE_ENV_LOG_ANALYTICS_WORKSPACE_RID. |
| docs/re-use-foundry-project.md | Updates azd env set example to AZURE_ENV_FOUNDRY_PROJECT_RID. |
| docs/CustomizingAzdParameters.md | Updates parameter table and examples to standardized env var names. |
| .github/workflows/job-deploy.yml | Renames workflow-call inputs/outputs and internal variables to standardized names. |
| .github/workflows/job-deploy-windows.yml | Renames reusable workflow inputs/env usage to standardized names. |
| .github/workflows/job-deploy-linux.yml | Renames reusable workflow inputs/env usage to standardized names. |
| .github/workflows/job-cleanup-deployment.yml | Updates cleanup workflow inputs/env usage for AI service location rename. |
| .github/workflows/deploy-v2.yml | Updates dispatch inputs validation and wiring to standardized names. |
| .github/workflows/deploy-orchestrator.yml | Updates orchestration wiring to standardized names. |
| .github/workflows/azure-dev.yml | Updates template validation env vars to standardized names. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if [[ -n "$INPUT_AZURE_ENV_FOUNDRY_PROJECT_RID" ]]; then | ||
| EXP_AI_PROJECT_ID="$INPUT_AZURE_ENV_FOUNDRY_PROJECT_RID" | ||
| else | ||
| EXP_AI_PROJECT_ID="${{ secrets.AZURE_ENV_FOUNDRY_PROJECT_ID }}" |
There was a problem hiding this comment.
In the EXP fallback branch, the workflow pulls the Foundry project resource from secrets.AZURE_ENV_FOUNDRY_PROJECT_ID, but the standardized variable name everywhere else is AZURE_ENV_FOUNDRY_PROJECT_RID. If the secret was renamed as part of this standardization, this will resolve to an empty string and silently set AZURE_ENV_FOUNDRY_PROJECT_RID to empty. Align the secret reference with the new *_RID naming (or explicitly support both names for backwards compatibility).
| EXP_AI_PROJECT_ID="${{ secrets.AZURE_ENV_FOUNDRY_PROJECT_ID }}" | |
| EXP_AI_PROJECT_ID="${{ secrets.AZURE_ENV_FOUNDRY_PROJECT_RID || secrets.AZURE_ENV_FOUNDRY_PROJECT_ID }}" |
| | `AZURE_ENV_ENABLE_TELEMETRY` | bool | `true` | Enables telemetry for monitoring and diagnostics. | | ||
| | `AZURE_EXISTING_AI_PROJECT_RESOURCE_ID` | string | `<Existing Workspace Id>` | Set this if you want to reuse an AI Foundry Project instead of creating a new one. | | ||
| | `AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID` | string | Guide to get your [Existing Workspace ID](/docs/re-use-log-analytics.md) | Set this if you want to reuse an existing Log Analytics Workspace instead of creating a new one. | | ||
| | `AZURE_ENV_FOUNDRY_PROJECT_RID` | string | `<Existing Workspace Id>` | Set this if you want to reuse an AI Foundry Project instead of creating a new one. | |
There was a problem hiding this comment.
The default value placeholder for AZURE_ENV_FOUNDRY_PROJECT_RID is listed as <Existing Workspace Id>, but this parameter is for an AI Foundry Project resource ID. Updating the placeholder text would make the documentation consistent with the parameter purpose and the re-use guide.
| | `AZURE_ENV_FOUNDRY_PROJECT_RID` | string | `<Existing Workspace Id>` | Set this if you want to reuse an AI Foundry Project instead of creating a new one. | | |
| | `AZURE_ENV_FOUNDRY_PROJECT_RID` | string | `<Existing AI Foundry Project Resource Id>` | Set this if you want to reuse an AI Foundry Project instead of creating a new one. | |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ramter in workflow
Purpose
This pull request updates several GitHub Actions workflow files to standardize and clarify environment variable names related to Azure resources. The changes focus on renaming variables for consistency and clarity, particularly those associated with AI services, Log Analytics, and AI project resources. No logic or functional changes are introduced—only variable names are updated across all affected workflows.
Does this introduce a breaking change?
How to Test
What to Check
Verify that the following are valid
Other Information