Home > Enterprise >  ARM template for API Connection to Service Bus using Managed Identity
ARM template for API Connection to Service Bus using Managed Identity

Time:07-07

To create an API Connection to Azure Service Bus using Managed Identity I'm using the following template:

  "resources": [
    {
      "type": "MICROSOFT.WEB/CONNECTIONS",
      "apiVersion": "2018-07-01-preview",
      "name": "[parameters('connections_servicebus_name')]",
      "location": "[parameters('connections_servicebus_location')]",
      "kind": "V1",
      "properties": {
        "alternativeParameterValues": {},
        "displayName": "[parameters('connections_servicebus_displayname')]",
        "api": {
          "name": "[parameters('connections_servicebus_name')]",
          "displayName": "[parameters('connections_servicebus_displayname')]",
          "id": "[concat(subscription().id, '/providers/Microsoft.Web/locations/', parameters('connections_servicebus_location'), '/managedApis/', 'servicebus')]",
          "type": "Microsoft.Web/locations/managedApis"
        },
        "customParameterValues": {},
        "parameterValueSet": {
          "name": "managedIdentityAuth",
          "values": {}
        }
      }
    }
  ]

that is actually working except for the fact that the 'NamespaceEndpoint' information (like: sb://mySBNS.servicebus.windows.net) is not provided anywhere and so the field appear empty on Azure portal:

enter image description here

After adding it manually, the connection and the LogicApp that is using it, start to work.

What is the json field to provide that information??

CodePudding user response:

You can refer to this question for full details:

"parameterValueSet": {
  "name": "managedIdentityAuth",
  "values": {
    "namespaceEndpoint": {
      "value": "sb://<servicebus-namespace-name>.servicebus.windows.net/"
    }
  }
}
  • Related