Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jamesbjackson/edfa16fdfdcf1a60ba1b0ef2ec2c0317 to your computer and use it in GitHub Desktop.
Save jamesbjackson/edfa16fdfdcf1a60ba1b0ef2ec2c0317 to your computer and use it in GitHub Desktop.
An Example of how to do a cross resource group deployment using Microsoft Azure ARM Templates.
{
"type": "Microsoft.Resources/deployments",
"properties": {
"mode": "Incremental",
"template": {
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": [
{
"apiVersion": "2016-04-01",
"name": "[concat('example.com', '/', 'test')]",
"location": "westus",
"type": "Microsoft.Network/dnszones/A",
"properties": {
"TTL": "61",
"ARecords": [
{
"ipv4Address": "[reference(resourceId(resourceGroup().name, 'Microsoft.Network/publicIPAddresses', 'my-virtual-machine-pip-eth0'), providers('Microsoft.Network', 'publicIPAddresses').apiVersions[0]).ipAddress]"
}
]
}
}
]
}
},
"apiVersion": "2017-05-10",
"resourceGroup": "example-com-dns-zone-rg",
"dependsOn": [
"[concat('Microsoft.Network/publicIPAddresses/', 'my-virtual-machine-pip-eth0')]"
],
"name": "my-virtual-machine-eth0-dns-record"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment