1

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"
    }
 }
Darin Howard
  • 397
  • 5
  • 16
  • 2
    At the bottom of this page it says only the root template may be set to Complete: https://msdn.microsoft.com/en-us/library/azure/dn790564.aspx "For nested templates, deployment mode Complete is only allowed on the root-level template" – Andrew W Jan 11 '17 at 04:28

2 Answers2

3

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

Fei Han
  • 26,415
  • 1
  • 30
  • 41
  • In setting the root template to 'Complete' and omitting mode from nested templates, I would assume that only resources in the root template are treated as 'Complete', as all resources in nested templates are treated as 'Incremental'. – Darin Howard Jan 11 '17 at 16:24
  • Is not using nested templates the only way to get a fully 'Complete' mode deployment? – Darin Howard Jan 11 '17 at 16:25
  • @DarinHoward I believe it's said that nested template doesn't support Complete mode. – EagleDev Apr 23 '18 at 23:56
0

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.

Erik Erikson
  • 418
  • 4
  • 9