Closed benofben closed 7 years ago
reference(concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Compute/virtualMachineScaleSets/server'), '/virtualMachines/0/networkInterfaces/nic/ipConfigurations/ipconfig/publicIPAddresses/public'), '2017-03-30').dnsSettings.fqdn)
concat(reference(concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Compute/virtualMachineScaleSets/server/virtualMachines/0/networkInterfaces/nic/ipConfigurations/ipconfig/publicIPAddresses/public'), '2017-03-30').dnsSettings.fqdn, ':8091')
Yikes. That works. Amazing.
Right now we have a hard dependency on the public DNS URL cloudapp.azure.com stuff. This won't work in sovereign clouds. To work there we'd need to do something like this (per Brian):
{ "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": {}, "variables": { "vmssName": "syncgateway", "vmssPipId": "[concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Compute/virtualMachineScaleSets/', variables('vmssName'), '/virtualMachines/0/networkInterfaces/nic/ipConfigurations/ipconfig/publicIPAddresses/public')]" }, "resources": [], "outputs": { "vmssPipFqdn": { "type": "string", "value": "[reference(variables('vmssPiPId'), '2017-03-30').dnsSettings.fqdn]" }, "vmssPipIp": { "type": "string", "value": "[reference(variables('vmssPiPId'), '2017-03-30').ipAddress]" } } }