I'm currently testing automated ARM template deployments in order to create very similar environments for our customers. They usually include an Azure Web App, an Azure SQL Database Instance (plus a new manage server instance in the same resource group) as well as a VM (which is currently omitted for the tests as the ARM template for VMs is quite bulky).
Unfortunately it seems that I'm currently not able to delete resource groups which were created in this manner. The deletion request is accepted (either cli or portal react the same way) and runs indefinetely. It tends to stop without an error message. The protocol for one of these resource groups looks like this:
The Delete SQL request seems to have failed with an error. This is odd as the resource is nowhere to be found - the resource group appears empty. Subsequent deletion requests behave the same way.
I'm not sure if this issue is connected to this question, that's why I'm posting my problem as well.
=== EDIT ===
This is the content of the error message I get when the Azure SQL resource in the template fails. I assume that the failed Azure SQL instance still manages to lock down the resource group - I'm just not able to get a handle on it to remove it before reiterating on the deployment.
{
"additionalProperties": {
"error": {
"code": "DeploymentFailed",
"details": [{
"code": "BadRequest",
"message": "{\r\n \"Code\": \"BadRequest\",\r\n \"Message\": \"Too many (2) hostnames in the default DNS zone. Limit is 1.\",\r\n \"Target\": null,\r\n \"Details\": [\r\n {\r\n \"Message\": \"Too many (2) hostnames in the default DNS zone. Limit is 1.\"\r\n },\r\n {\r\n \"Code\": \"BadRequest\"\r\n },\r\n {\r\n \"ErrorEntity\": {\r\n \"ExtendedCode\": \"04017\",\r\n \"MessageTemplate\": \"Too many ({0}) hostnames in the default DNS zone. Limit is {1}.\",\r\n \"Parameters\": [\r\n \"2\",\r\n \"1\"\r\n ],\r\n \"Code\": \"BadRequest\",\r\n \"Message\": \"Too many (2) hostnames in the default DNS zone. Limit is 1.\"\r\n }\r\n }\r\n ],\r\n \"Innererror\": null\r\n}"
},
{
"code": "Conflict",
"message": "{\r\n \"status\": \"Failed\",\r\n \"error\": {\r\n \"code\": \"ResourceDeploymentFailure\",\r\n \"message\": \"The resource operation completed with terminal provisioning state 'Failed'.\",\r\n \"details\": [\r\n {\r\n \"code\": \"InvalidParameterValue\",\r\n \"message\": \"Invalid value given for parameter Password. Specify a valid parameter value.\"\r\n }\r\n ]\r\n }\r\n}"
}
],
"message": "At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-debug for usage details."
},
"status": "Failed"
},
"id": null,
"name": null,
"properties": null
}