Skip to content

fix: Standardization of parameters and update workflows and documentation#145

Draft
Prachig-Microsoft wants to merge 5 commits intodevfrom
psl-prachi-params
Draft

fix: Standardization of parameters and update workflows and documentation#145
Prachig-Microsoft wants to merge 5 commits intodevfrom
psl-prachi-params

Conversation

@Prachig-Microsoft
Copy link

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

  • I have tested the primary workflows (the "golden path") to ensure they function correctly without errors.

Deployment Validation

  • I have validated the deployment process successfully and all services are running as expected with this change.

What to Check

Verify that the following are valid

  • ...

Other Information

- 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
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 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 aiDeploymentLocation parameter 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.

Comment on lines +259 to +268
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 }}"
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 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).

Copilot uses AI. Check for mistakes.
Comment on lines +259 to +268
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 }}"
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 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).

Copilot uses AI. Check for mistakes.
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>'
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.

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

Copilot uses AI. Check for mistakes.
Comment on lines +13 to +20
| `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. |
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 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.

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

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

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.

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

Copilot uses AI. Check for mistakes.
Comment on lines 270 to 274
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: |
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 "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.

Copilot uses AI. Check for mistakes.
Comment on lines 59 to 63
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 }}
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 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.

Copilot uses AI. Check for mistakes.
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 }}
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 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.

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

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