fix: Standardization of parameters and update workflows and documentation#145
fix: Standardization of parameters and update workflows and documentation#145Prachig-Microsoft wants to merge 5 commits intodevfrom
Conversation
- Reverted containerRegistryHost to use AZURE_CONTAINER_REGISTRY_HOST - Reverted AI model parameters to use AZURE_AI_MODEL_NAME, AZURE_AI_MODEL_VERSION, AZURE_AI_MODEL_CAPACITY - Reverted deployment type to use AZURE_AI_DEPLOYMENT_TYPE - Removed enableTelemetry parameter customization (uses bicep default) - Updated workflow files and documentation to reflect original naming - Kept AZURE_ENV_ prefix only for: AI_SERVICE_LOCATION, LOG_ANALYTICS_WORKSPACE_RID, FOUNDRY_PROJECT_RID, VM_ADMIN credentials, IMAGETAG
There was a problem hiding this comment.
Pull request overview
This PR standardizes how AI service locations and existing resource IDs are passed through AZD deployments by renaming key environment variables, removing redundant parameters, and aligning infra templates, workflows, and docs to the updated naming.
Changes:
- Updated infra parameter files to use standardized env var names (notably
AZURE_ENV_AI_SERVICE_LOCATION,AZURE_ENV_LOG_ANALYTICS_WORKSPACE_RID,AZURE_ENV_FOUNDRY_PROJECT_RID) and removed deprecated/redundant parameters. - Removed the
aiDeploymentLocationparameter from Bicep/ARM (and corresponding CI invocation). - Updated GitHub deployment workflows and documentation to reflect the new env var names.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
infra/main.waf.parameters.json |
Switches AI location and existing resource ID env vars to standardized names. |
infra/main.parameters.json |
Same standardization for non-WAF parameters; drops deprecated/redundant entries. |
infra/main.json |
Regenerated ARM template; removes aiDeploymentLocation parameter. |
infra/main.bicep |
Removes aiDeploymentLocation parameter definition. |
docs/re-use-log-analytics.md |
Updates env var name for reusing an existing Log Analytics workspace. |
docs/re-use-foundry-project.md |
Updates env var name for reusing an existing Foundry project. |
docs/CustomizingAzdParameters.md |
Updates the parameter list to reflect new standardized env vars. |
.github/workflows/job-deploy-windows.yml |
Sets standardized env vars (AI location + existing resource IDs) during deployment. |
.github/workflows/job-deploy-linux.yml |
Sets standardized env vars (AI location + existing resource IDs) during deployment. |
.github/workflows/ci.yml |
Removes the now-deleted aiDeploymentLocation parameter from CI validation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if [[ -n "$AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID_INPUT" ]]; then | ||
| EXP_LOG_ANALYTICS_ID="$AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID_INPUT" | ||
| else | ||
| EXP_LOG_ANALYTICS_ID="${{ secrets.AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID }}" | ||
| EXP_LOG_ANALYTICS_ID="${{ secrets.AZURE_ENV_LOG_ANALYTICS_WORKSPACE_RID }}" | ||
| fi | ||
|
|
||
| if [[ -n "$AZURE_EXISTING_AI_PROJECT_RESOURCE_ID_INPUT" ]]; then | ||
| EXP_AI_PROJECT_ID="$AZURE_EXISTING_AI_PROJECT_RESOURCE_ID_INPUT" | ||
| else | ||
| EXP_AI_PROJECT_ID="${{ secrets.AZURE_EXISTING_AI_PROJECT_RESOURCE_ID }}" | ||
| EXP_AI_PROJECT_ID="${{ secrets.AZURE_ENV_FOUNDRY_PROJECT_RID }}" |
There was a problem hiding this comment.
The EXP parameter selection still reads from the old input/env names (AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID_INPUT and AZURE_EXISTING_AI_PROJECT_RESOURCE_ID_INPUT) while the workflow now sets AZURE_ENV_LOG_ANALYTICS_WORKSPACE_RID / AZURE_ENV_FOUNDRY_PROJECT_RID into the azd environment. This undermines the parameter-name standardization and can break callers that switch to the new names. Consider renaming the workflow_call inputs and the intermediate variables to the new *_RID names and updating the validation/warning logic accordingly (keeping backwards-compat mapping only if needed).
| if ($env:AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID -ne "") { | ||
| $EXP_LOG_ANALYTICS_ID = $env:AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID | ||
| } else { | ||
| $EXP_LOG_ANALYTICS_ID = "${{ secrets.AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID }}" | ||
| $EXP_LOG_ANALYTICS_ID = "${{ secrets.AZURE_ENV_LOG_ANALYTICS_WORKSPACE_RID }}" | ||
| } | ||
|
|
||
| if ($env:AZURE_EXISTING_AI_PROJECT_RESOURCE_ID -ne "") { | ||
| $EXP_AI_PROJECT_ID = $env:AZURE_EXISTING_AI_PROJECT_RESOURCE_ID | ||
| } else { | ||
| $EXP_AI_PROJECT_ID = "${{ secrets.AZURE_EXISTING_AI_PROJECT_RESOURCE_ID }}" | ||
| $EXP_AI_PROJECT_ID = "${{ secrets.AZURE_ENV_FOUNDRY_PROJECT_RID }}" |
There was a problem hiding this comment.
The EXP parameter selection still checks $env:AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID and $env:AZURE_EXISTING_AI_PROJECT_RESOURCE_ID, but the workflow now writes AZURE_ENV_LOG_ANALYTICS_WORKSPACE_RID / AZURE_ENV_FOUNDRY_PROJECT_RID into the azd environment. To fully standardize and avoid breaking callers that move to the new names, rename the workflow_call inputs and the env var references here to the new *_RID names (and update the validation block earlier in the file to match).
| Run the following command in your terminal | ||
| ```bash | ||
| azd env set AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID '<Existing Log Analytics Workspace Id>' | ||
| azd env set AZURE_ENV_LOG_ANALYTICS_WORKSPACE_RID '<Existing Log Analytics Workspace Id>' |
There was a problem hiding this comment.
This now sets AZURE_ENV_LOG_ANALYTICS_WORKSPACE_RID, but the placeholder still says "Workspace Id". To reduce confusion (since this value must be an Azure Resource ID), consider updating the placeholder (and nearby wording, if applicable) to consistently say "Resource ID".
| | `AZURE_CONTAINER_REGISTRY_HOST` | string | `myregistry.azurecr.io` | Specifies the container registry host from which to pull app container images. | | ||
| | `AZURE_ENV_AI_SERVICE_LOCATION` | string | `eastus2` | Specifies the Azure region for AI services (OpenAI/AI Foundry). | | ||
| | `AZURE_AI_DEPLOYMENT_TYPE` | string | `GlobalStandard` | Defines the model deployment type (allowed values: `Standard`, `GlobalStandard`). | | ||
| | `AZURE_AI_MODEL_NAME` | string | `o3` | Specifies the `o` model name. | | ||
| | `AZURE_AI_MODEL_VERSION` | string | `2025-04-16` | Specifies the `o` model version. | | ||
| | `AZURE_AI_MODEL_CAPACITY` | integer | `200` | Sets the model capacity (choose based on your subscription's available `o` capacity). | | ||
| | `AZURE_AI_MODEL_NAME` | string | `o3` | Specifies the AI model name. | | ||
| | `AZURE_AI_MODEL_VERSION` | string | `2025-04-16` | Specifies the AI model version. | | ||
| | `AZURE_AI_MODEL_CAPACITY` | integer | `200` | Sets the model capacity (choose based on your subscription's available capacity). | | ||
| | `AZURE_ENV_LOG_ANALYTICS_WORKSPACE_RID` | string | `` | Optional. Resource ID of an existing Log Analytics workspace to use. | | ||
| | `AZURE_ENV_FOUNDRY_PROJECT_RID` | string | `` | Optional. Resource ID of an existing AI Foundry project to use. | |
There was a problem hiding this comment.
The markdown table formatting is a bit inconsistent in the updated rows (uneven spacing in the AZURE_CONTAINER_REGISTRY_HOST and AZURE_ENV_AI_SERVICE_LOCATION entries, and the new rows have empty example values that don’t illustrate the expected Resource ID format). Consider normalizing spacing and providing representative example Resource IDs for the *_RID parameters to make the documentation clearer.
- Changed all workflow inputs from AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID to AZURE_ENV_LOG_ANALYTICS_WORKSPACE_RID - Ensures consistency with parameter files and documentation - Affected files: deploy-orchestrator.yml, deploy-v2.yml, job-deploy.yml, job-deploy-linux.yml, job-deploy-windows.yml
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| INPUT_BUILD_DOCKER_IMAGE: ${{ github.event.inputs.build_docker_image }} | ||
| INPUT_CLEANUP_RESOURCES: ${{ github.event.inputs.cleanup_resources }} | ||
| INPUT_AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID: ${{ github.event.inputs.AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID }} | ||
| INPUT_AZURE_ENV_LOG_ANALYTICS_WORKSPACE_RID: ${{ github.event.inputs.AZURE_ENV_LOG_ANALYTICS_WORKSPACE_RID }} |
There was a problem hiding this comment.
deploy-v2.yml still defines the workflow_dispatch input as AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID, but the validation step reads ${{ github.event.inputs.AZURE_ENV_LOG_ANALYTICS_WORKSPACE_RID }} and later outputs azure_env_log_analytics_workspace_rid. As-is, the value will always be empty and the validation block below also references INPUT_AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID which is never set. Rename the workflow_dispatch input to AZURE_ENV_LOG_ANALYTICS_WORKSPACE_RID (or update the references back to _ID) and make the variable names consistent throughout the validation/output logic.
| INPUT_AZURE_ENV_LOG_ANALYTICS_WORKSPACE_RID: ${{ github.event.inputs.AZURE_ENV_LOG_ANALYTICS_WORKSPACE_RID }} | |
| INPUT_AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID: ${{ github.event.inputs.AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID }} |
| env: | ||
| INPUT_EXP: ${{ inputs.EXP }} | ||
| INPUT_LOG_ANALYTICS_WORKSPACE_ID: ${{ inputs.AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID }} | ||
| INPUT_LOG_ANALYTICS_WORKSPACE_RID: ${{ inputs.AZURE_ENV_LOG_ANALYTICS_WORKSPACE_RID }} | ||
| INPUT_AI_PROJECT_RESOURCE_ID: ${{ inputs.AZURE_EXISTING_AI_PROJECT_RESOURCE_ID }} | ||
| run: | |
There was a problem hiding this comment.
In the "Validate and Auto-Configure EXP" step, the env var was renamed to INPUT_LOG_ANALYTICS_WORKSPACE_RID, but the script logic below still checks/prints INPUT_LOG_ANALYTICS_WORKSPACE_ID. This makes the auto-enable branch ignore the provided Log Analytics resource ID. Update the script to consistently use the _RID variable name.
| INPUT_BUILD_DOCKER_IMAGE: ${{ inputs.BUILD_DOCKER_IMAGE }} | ||
| INPUT_EXP: ${{ inputs.EXP }} | ||
| INPUT_WAF_ENABLED: ${{ inputs.WAF_ENABLED }} | ||
| INPUT_AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID: ${{ inputs.AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID }} | ||
| INPUT_AZURE_ENV_LOG_ANALYTICS_WORKSPACE_RID: ${{ inputs.AZURE_ENV_LOG_ANALYTICS_WORKSPACE_RID }} | ||
| INPUT_AZURE_EXISTING_AI_PROJECT_RESOURCE_ID: ${{ inputs.AZURE_EXISTING_AI_PROJECT_RESOURCE_ID }} |
There was a problem hiding this comment.
The validation step maps the input into INPUT_AZURE_ENV_LOG_ANALYTICS_WORKSPACE_RID, but the validation logic later in this script still references INPUT_AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID. That means the Log Analytics Resource ID is never validated (and a typo could slip through unnoticed). Rename the referenced variable in the validation logic to _RID to match the input.
| INPUT_EXP: ${{ inputs.EXP }} | ||
| INPUT_WAF_ENABLED: ${{ inputs.WAF_ENABLED }} | ||
| INPUT_AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID: ${{ inputs.AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID }} | ||
| INPUT_AZURE_ENV_LOG_ANALYTICS_WORKSPACE_RID: ${{ inputs.AZURE_ENV_LOG_ANALYTICS_WORKSPACE_RID }} |
There was a problem hiding this comment.
The validation step maps the input into INPUT_AZURE_ENV_LOG_ANALYTICS_WORKSPACE_RID, but the validation logic later in this script still references INPUT_AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID. As a result, the provided Log Analytics Resource ID won’t be validated. Update the validation logic to consistently use the _RID variable name.
| INPUT_AZURE_ENV_LOG_ANALYTICS_WORKSPACE_RID: ${{ inputs.AZURE_ENV_LOG_ANALYTICS_WORKSPACE_RID }} | |
| INPUT_AZURE_ENV_LOG_ANALYTICS_WORKSPACE_RID: ${{ inputs.AZURE_ENV_LOG_ANALYTICS_WORKSPACE_RID }} | |
| INPUT_AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID: ${{ inputs.AZURE_ENV_LOG_ANALYTICS_WORKSPACE_RID }} |
This pull request updates how AI service and resource IDs are handled throughout the deployment workflows, infrastructure templates, and documentation. The main goal is to standardize environment variable naming (especially for AI service locations and resource IDs), remove deprecated or redundant parameters, and ensure consistency across Linux/Windows workflows, Bicep/ARM templates, and documentation.
Key changes include:
These changes help ensure consistency, reduce confusion, and make it easier to manage and reuse AI-related resources in different environments.] No
Golden Path Validation
Deployment Validation
What to Check
Verify that the following are valid
Other Information