AzureResourceGroupDeployment, which exists in versions 1 and 2, has been renamed in version 3 to AzureResourceManagerTemplateDeployment. They serve the same purpose, but the latter has some extra capabilities.
The differences I noticed:
- Added support for deployment scopes other than resource group:
deploymentScope
- As a result, the
resourceGroup
input is no longer required -- it is required only when deploying a resource group.
- Renamed service connection input: from
azureSubscription
to azureResourceManagerConnection
- The alias
ConnectedServiceName
stayed untouched, though.
- Added an option to override the subscription ID specified in the service connection:
subscriptionId
- Previously, the subscription was always taken from the service connection.
- The documentation incorrectly states that the
subscriptionId
input is required unless deploying to a management group. This is not true -- supplying any falsy value (including not specifying the input at all, resulting in undefined
, which is falsy) triggers its load from the service connection. See the code of the task. This works OK in the YAML pipelines, but cannot be achieved in the classic pipelines, to my knowledge, because of the limitations of the UI. Thus, for classic pipelines, subscriptionId
is actually required.
subscriptionId
has an alias subscriptionName
, but don't get fooled: they both accept only the GUID, not the name. This is because they directly insert the value into the URIs used for REST API calls.
- Removed support for the deployment of DevOps agents:
enableDeploymentPrerequisites
and related, many values of action
By the way, the current version of the task supports not only JSON ARM templates but also Bicep ones. The feature is implemented using Azure CLI in the background, so you should be able to control the version of Bicep via az bicep install --version ...
in a script before the deployment task. Replace ...
with the specific version, e.g. v0.20.4
.
The necessary update to the task is available in DevOps Server 2022. On DevOps Server 2020u1, the task is available in the same major version, too, but I have verified that Bicep templates cause the task to fail while trying to parse them as JSON there.