Azure / Azure/azure-devtestlab

getDeploymentOutput not working

Open
#815 3 comments 0 reactions 0 assignees View on GitHub
bug tasks
Dominant language
PowerShell
Stars
465
Forks
595
PR merge metrics
No merged PRs in 30d

Description

Despite **OutputTemplateVariables** = true

export async function getDeploymentOutput(armClient: ResourceManagementClient, resourceGroupName: string): Promise {
167 >> const deploymentName = results._response.parsedBody[0].name;
}
is getting the last "deployment" instead of looking for the last "full" deployment, ie : DeploymentName = Dtl3p5bv1hko

So it's not getting the correct deployment information.

Finished updating Lab Environment ''.
##[debug]environmentResourceGroupId=/subscriptions/***/resourcegroups/xx-devtest-lab1-rg
##[debug]DeployUtil: Getting deployment output for resource group 'xx-devtest-lab1-rg'.
##[debug]DeployUtil: Completed getting deployment output for resource group 'xx-devtest-lab1-rg'.
##[debug]task result: Succeeded

In my case, my **azuredeploy.json** contains "sub" deployments, so the "last" deployment is not the main deployment.

Can we fix this to get the correct deployment based on the **DeploymentName**, not the one in position 0 ?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.