0

I have a blank arm template and I created a release pipeline to deploy it to an existing resource group in complete mode. The resource group had 2 resources in it (key vault and sql server).

When I run the release pipeline, it runs successfully but the 2 resources are still there. Does this prove that complete mode does not work ? I can of course manually delete the resources (they are not locked or anything).

Given below are arm template

{
    "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {},
    "variables": {},
    "resources": []
}
Blue Clouds
  • 7,295
  • 4
  • 71
  • 112

2 Answers2

0

I would suspect that the template needs to deploy at least a single resource to be effective.

You are not really supposed to use ARM Templates to delete stuff from the resource groups (well, unless you actually add something to it). I've used complete mode deployments many times, they work fine (even work with nested deployments correctly) and they do clean up stuff that they didn't deploy (and that's the beauty of complete mode deployments).

4c74356b41
  • 69,186
  • 6
  • 100
  • 141
0

First use a task as shown below. After this use the same task you mentioned. Make sure to use the same RG name in pipeline.

enter image description here

Blue Clouds
  • 7,295
  • 4
  • 71
  • 112