0

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:

enter image description here

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
}
WalternativE
  • 493
  • 4
  • 15
  • Probably best to tweet @AzureSupport or open a support request in the portal – bmoore-msft Mar 23 '18 at 16:09
  • Hi, @bmoore-msft. They told me to come here and open this question. They then told me that they would forward the link to this question to engineering. Was that wrong? – WalternativE Mar 25 '18 at 15:31
  • Can you share the template? Or a full list of all resources being created? Very possible one of the resources is being deployed with a lock and stopping you from deleting. – micahmckittrick Mar 26 '18 at 02:48
  • Can you add a correlationId from one of the failures, likely we'll need that to debug. – bmoore-msft Mar 26 '18 at 14:46
  • 1
    Hi, @Micah_MSFT. The template file I use to create the environment can be found [here](https://hakomdivresourcesstorage.blob.core.windows.net/div/template.json). – WalternativE Mar 27 '18 at 10:04
  • Hi, @bmoore-msft. I don't get a correlation ID - the request just never finishes. I tryed to reproduce this state again and deployed the failing template. The Azure SQL Part of this deployment failed - I assume the resource still locks down the resource group without me being able to delete it - I'll edit the error message to the main issue. – WalternativE Mar 27 '18 at 10:05
  • @bmoore-msft - I kept on trying via the azure cli to delete a resource group with a botched Azure SQL deployment and I finally got an error with a correlation id. I still can't delete the RG but I have more data for you: corr-id: 86b9e3a3-f4eb-4f1e-bf1a-a7e849bd6b75 Status: 409 Conflict – WalternativE Mar 27 '18 at 11:06
  • Thanks - I will open a ticket, email me (bmoore at microsoft) and I'll keep you updated if you promise to post the resolution back here ;) – bmoore-msft Mar 28 '18 at 15:34
  • @bmoore-msft, I'll gladly do that :) – WalternativE Mar 29 '18 at 09:48
  • @WalternativE - can you shoot me an email, would like to work with you on a repro for this bmoore at microsoft dot com – bmoore-msft Apr 13 '18 at 19:43
  • @WalternativE @bmoore-msft any update on this? I am getting a similar error message regarding passowrds `Invalid value given for parameter Password. Specify a valid parameter value.` when trying to create an instance of SQL Server, I am trying to figure out what's missing from a working ARM template (which is huge like 10000 lines) but I am stuck. – TPPZ Aug 20 '18 at 10:04
  • @TPPZ, Were you ever able to deploy the ARM template with the given parameter file? If you pulled it down freshly you should be aware that all password related parameters are removed by default (I'm just guessing here as I don't know your setup). If it's not that it might merit its own SO issue. – WalternativE Aug 21 '18 at 09:01
  • 2
    I've figured out I had to add this field `administratorLoginPassword` (with the password as a value) to the JSON ARM template to deploy a new instance of a SQL Server. A bit unsafe, but there are safer options, details in the comments to some answers here: https://stackoverflow.com/questions/51929215/create-sql-server-via-azure-resource-manager-arm-template – TPPZ Aug 21 '18 at 09:14

0 Answers0