Darin Howard
Darin Howard

Reputation: 397

Can an Azure ARM nested template be deployed with a mode of Complete?

All the examples have the mode of nested templates set to 'Incremental'.

When I set it to 'Complete', I get the following error:

error:   InvalidNestedDeploymentMode : Specified deployment mode 'Complete' is not supported for nested deployment 'shared'. Please see https://aka.ms/arm-deploy for usage details.
error:   Deployment validate failed.
error:   Error information has been recorded to /Users/.../.azure/azure.err
verbose: Error: Deployment validate failed.

I've tried running the deployment creation w/ both incremental and complete mode, getting the same error.

Wasn't sure if this was even possible - can't find any docs related to the error 'InvalidNestedDeploymentMode'.

Portion of the ARM template :

 {
  "name": "[concat('node', copyIndex())]",
  "type": "Microsoft.Resources/deployments",
  "apiVersion": "2015-01-01",
  "dependsOn": [
    "[resourceId('Microsoft.Resources/deployments', 'shared')]"
  ],
  "copy": {
    "name": "nodecopy",
    "count": "[parameters('vmCount')]"
  },
  "properties": {
    "mode": "Complete",
    "templateLink": {
      "uri": "...",
      "contentVersion": "1.0.0.0"
    }
 }

Upvotes: 1

Views: 1744

Answers (2)

Erik Erikson
Erik Erikson

Reputation: 578

See the note under "Link Templates for Deployment".

TL;DR: if your nested template targets the same resource group as the top level template and you deploy the top level template in "Complete" mode the nested template will be treated as being deployed in "Complete" mode but otherwise it will be deployed in "Incremental" mode.

Upvotes: 0

Fei Han
Fei Han

Reputation: 27793

Can an Azure ARM nested template be deployed with a mode of Complete?

Firstly, we could know Incremental and Complete mode that used to deploy resources from this documentation.

enter image description here

Besides, as Andrew W said, only the root-level template is allowed Complete for the deployment mode. If you use Azure PowerShell with Resource Manager templates to deploy your resources to Azure and use -Debug parameter, you could see detailed error message.

enter image description here

Upvotes: 3

Related Questions