简体   繁体   中英

Strange Azure Resource Group Deployment Error

As part of my release definition, I have specific a Azure Resource Group Deployment task with action of Create or Update.

When I start a new release, the Azure Resource Group Deployment encounters the following error

2018-11-27T20:52:54.1969890Z ##[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-11-27T20:52:54.1978636Z ##[debug]Processed: ##vso[task.issue type=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-11-27T20:52:54.1979036Z ##[error]Details:

2018-11-27T20:52:54.1979251Z ##[debug]Processed: ##vso[task.issue type=error;]Details:

2018-11-27T20:52:54.1979531Z ##[error]Conflict: {

"code": "Conflict",

"message": "Domain name dev-xxxxcu-tm.trafficmanager.net already exists. Please choose a different DNS prefix."

} undefined

2018-11-27T20:52:54.1979791Z ##[debug]Processed: ##vso[task.issue type=error;]Conflict: {%0D%0A "code": "Conflict",%0D%0A "message": "Domain name dev-xxxxcu-tm.trafficmanager.net already exists. Please choose a different DNS prefix."%0D%0A} undefined

2018-11-27T20:52:54.1979957Z ##[debug]task result: Failed

2018-11-27T20:52:54.1980125Z ##[error]Task failed while creating or updating the template deployment.

2018-11-27T20:52:54.1980303Z ##[debug]Processed: ##vso[task.issue type=error;]Task failed while creating or updating the template deployment.

2018-11-27T20:52:54.1981450Z ##[debug]Processed: ##vso[task.complete result=Failed;]Task failed while creating or updating the template deployment.

2018-11-27T20:52:54.1991258Z ##[section]Finishing: Azure Deployment:Create Or Update Resource Group action on $(Release.EnvironmentName)-xxxxcu-rg

I've reviewed the azure template json and don't see anything relative to this error. There are variables related to the Traffic Manager, see below:

"names-traffic-manager": {
  "type": "string",
  "metadata": {
    "description": "The name of the traffic manager instance"
  }
},

{
  "apiVersion": "2015-11-01",
  "type": "Microsoft.Network/trafficManagerProfiles",
  "name": "TrafficManager",
  "location": "global",
  "properties": {
    "profileStatus": "Enabled",
    "trafficRoutingMethod": "Priority",
    "dnsConfig": {
      "relativeName": "[parameters('names-traffic-manager')]",
      "ttl": 30
    },
    "monitorConfig": {
      "protocol": "HTTPS",
      "port": 443,
      "path": "/"
    }
  }
},

Thanks for input...I've also verified the Traffic Manager profile is correct in Azure Portal

You need to change the traffic manager relativeName , you would do that at this line:

"relativeName": "TrafficManager-unique-name-3245235",

You can also use a parameter to construct the name on the fly:

"relativeName": "[concat(parameters('names-traffic-manager'), '-traffic-manager')]

Due to the implementation of a WAF (Web Application Firewall) by an outside vendor, the trafficmanager instance was no longer accessible by http or https requests, only from sources that were allowed through the WAF.

To work around this issue I simply set the value for the TM variable to be the related azure instance (dev.xxxx.org, test.xxxx.org and www.xxxx.org). This fixed the issue and the release is running without error now.

Thanks to everyone for the help. This was my first experience with Azure Pipelines so its been a big learning curve, basically got thrown in and told to swim :D

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM