2

Is it possible to export an Azure Hybrid Connection relay to an ARM template? When exporting the whole resource group, the relay is not included. The relay is defined by this ARM template.

The ARM template I use creates a corrupt relay. But if I add the relay manually instead, it works. That's the reason I need to investigate an exported ARM template.

My current ARM template:

{
    "apiVersion": "2019-08-01",
    "dependsOn":
    [
        "[resourceId('Microsoft.Web/sites', variables('webAppName'))]"
    ],
    "name": "[concat(parameters('relayName'), '/', parameters('hybridName'))]",
    "location": "[resourceGroup().location]",
    "properties":
    {
        "relayArmUri": "[concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', parameters('relayResourceGroup'), '/providers/Microsoft.Relay/namespaces/', parameters('relayName'), '/hybridConnections/', parameters('hybridName'))]",
        "sendKeyName": "defaultSender",
        "sendKeyValue": "[listkeys(concat(variables('hybridConnectionResourceId'), '/authorizationRules/defaultSender'), '2017-04-01').primaryKey]",
        "hostname": "[parameters('hostname')]",
        "port": "[parameters('port')]",
        "serviceBusSuffix": ".servicebus.windows.net"
    },
    "type": "hybridConnectionNamespaces/relays"
}
Kristoffer Jälén
  • 4,112
  • 3
  • 30
  • 54
  • I performed the same repro in my environment , when I tried exporting the template at resource group level I can see the hybrid connection & relay as well . Here is the screenshot below https://imgur.com/SpLE7nv could you please clarify more on this or if I misunderstood your issue? – VenkateshDodda Jul 02 '21 at 12:58
  • @VenkateshDodda-MT Thanks for your reply. I re-exported at resource group level, but neither the hybrid connection or relays are there. Maybe it's related to user rights. These hybrid connections are owned by someone else and are in another resource group. – Kristoffer Jälén Aug 03 '21 at 12:26
  • I've created a GitHub issue: https://github.com/Azure/azure-relay-dotnet/issues/149 – Kristoffer Jälén Aug 03 '21 at 12:30

0 Answers0