Skip to content

fix: Standardize environment variable naming conventions#867

Draft
Prachig-Microsoft wants to merge 5 commits intodev-v4from
feature/parameter-naming-standardization
Draft

fix: Standardize environment variable naming conventions#867
Prachig-Microsoft wants to merge 5 commits intodev-v4from
feature/parameter-naming-standardization

Conversation

@Prachig-Microsoft
Copy link

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?

  • Yes
  • No

How to Test

  • Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install
  • Test the code

What to Check

Verify that the following are valid

  • ...

Other Information

- 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.
@Prachig-Microsoft Prachig-Microsoft changed the title Standardize environment variable naming conventions fix: Standardize environment variable naming conventions Mar 20, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_LOCATION to AZURE_ENV_AI_SERVICE_LOCATION across 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 *_RID for 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 }}"
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
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 }}"

Copilot uses AI. Check for mistakes.
| `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. |
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
| `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. |

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants