0
votes

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.

1
The agent is called Hosted Linux Preview. I tried to lookup for a version but can't see any property describing it with a version.Cristian E.
yeah, try using latest step version, are you deploying using resource group deployment step?4c74356b41
Yep I'm deploying using Azure Resource Group Deployment task. And its version 2 selected, which seem to be latest.Cristian E.
try azure powershell task latest version and do the same deployment4c74356b41

1 Answers

1
votes

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.