The following command (point 2) $vm = az vm show --resource-group "$resourceGroupName" --name $vmName --query "id" --output tsv
is interpreted as a task group parameter, and automatically displayed on task group parameters (point 1).
I can't remove it as a parameter.
Why does this happen? How to prevent it?
My first impression is that you have somewhere in the script an Azure CLI command like this:
$vm = $(az vm show ...)
$(xxx)
is the syntax to reference a pipeline variable. Task groups will automatically add a parameter for any string that is found between $(
and )
, such as $(az vm show ...)
:
I just created a dummy task group with an Azure CLI task:
The following parameters were added automatically to the task group:
Remove the $(
and )
from the Azure CLI command if possible and then save the task group.