0

Basically after adding the "dnsNameLabel" value for my arm template for azure container instances, i got this message:

2018-07-03T14:31:14.8518944Z ##[error]At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-debug for usage details.
2018-07-03T14:31:14.8571875Z ##[error]Details:
2018-07-03T14:31:14.8616789Z ##[error]BadRequest: {
  "error": {
    "code": "DnsNameLabelNotSupported",
    "message": "DNS name label for container group is not supported before version '2018-02-01-preview'."
  }
}

Excerpt from the arm-template.json

...
            "osType": "[variables('osType')]",
            "ipAddress": {
                "type": "Public",
                "dnsNameLabel": "rabbitmq",
                "ports": [
                    {
                        "protocol": "tcp",
                        "port": "15672"
                    }
                ]
            },
...

P.S. I'm deploying using VSTS's Azure Resource Group Deployment task.

Cristian E.
  • 3,116
  • 7
  • 31
  • 61

1 Answers1

1

The problem was caused by the "apiVersion" key in the arm template file. It had to be updated to match a newer version of the api. Navigating to github arm templates repo you could see which is the latest version.

Updating it to latest solved the problem.

Another suggestion is to use JSON schema validator for making sure the contents of the .json file matches the schema.

Cristian E.
  • 3,116
  • 7
  • 31
  • 61
  • Since your problem has been solved, you can mark the answer. – Marina Liu Jul 20 '18 at 08:57
  • Cristian is correct, DNS name labels required a change in the API to support the new property so you need to use an API version that supports said property. – jluk Jul 20 '18 at 16:59