Hi,
Removed ConvertFrom-Json from create command and added to the show command and it was started working as expected.
Could you please help us to know why "ConvertFrom-Json" wasn't worked on Create command.
$resultBicep = az deployment sub create `
--name $(Build.BuildNumber) `
--location ${{lower(variables.location)}} `
--template-file '$(Pipeline.Workspace)/drop/${{lower(variables.iacTemplatePath)}}' `
--parameters '$(Pipeline.Workspace)/drop/${{lower(variables.iacTemplateParametersPath)}}'
$result = az deployment sub show --name $(Build.BuildNumber) | ConvertFrom-Json
$resourceGroupName = $result.properties.outputs.resourceGroupName.value
Write-Host "##vso[task.setvariable variable=resourceGroupName]$resourceGroupName"