Skip to content

fix: update script to handle avm deployment output values retrieval#493

Merged
Prajwal-Microsoft merged 3 commits intodevfrom
hb-script-fix
Nov 7, 2025
Merged

fix: update script to handle avm deployment output values retrieval#493
Prajwal-Microsoft merged 3 commits intodevfrom
hb-script-fix

Conversation

@Harsh-Microsoft
Copy link
Copy Markdown
Contributor

Purpose

This pull request improves the robustness and flexibility of the Azure deployment script by enhancing how deployment output values are retrieved and by refining the Azure login process. The main changes are grouped into improvements for deployment output parsing and Azure authentication flow.

Deployment output parsing improvements:

  • Introduced a helper function Get-DeploymentOutputValue in Deployment/resourcedeployment.ps1 to retrieve values from deployment outputs, supporting both legacy and new output key conventions for backward compatibility. This function is now used to extract all key deployment outputs such as tenant ID, resource group ID, storage account name, AKS name, and others. [1] [2]

Azure authentication flow enhancements:

  • Updated the LoginAzure function to attempt a generic az login when tenant ID or subscription ID is missing, with error handling and user feedback. Also, introduced a $script:alreadyLoggedIn flag to avoid redundant logins.
  • Adjusted the deployment process to ensure an initial login occurs before mapping deployment results and only performs a second login if not already authenticated.

Does this introduce a breaking change?

  • Yes
  • 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

@Prajwal-Microsoft Prajwal-Microsoft merged commit b8685cb into dev Nov 7, 2025
5 checks passed
@Priyanka-Microsoft Priyanka-Microsoft deleted the hb-script-fix branch December 25, 2025 09:21
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 1.2.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants