Reputation: 3832
My ARM template needs to create DSC node configuration in Azure Automation Account which is not part of template and exists in external resource group. How do I properly reference automation account for Microsoft.Automation/automationAccounts/configurations
template?
Example of what I have is below
{
"name": "[reference(resourceId(parameters('AutomationaccountRGName'), 'Microsoft.Automation/automationAccounts/configurations', parameters('AutomationaccountName'), 'swarmhost.localhost'))]",
"type": "Microsoft.Automation/automationAccounts/configurations",
"apiVersion": "[variables('automationApiVersion')]",
"properties": {
"logVerbose": "false",
"description": "Configuration for worker hosts",
"Source": {
"type": "uri",
"Value": "https://raw.githubusercontent.com/artisticcheese/SwarmARM/master/VMSS-Linked/swarmhost.ps1"
}
}
}
Upvotes: 1
Views: 1178
Reputation: 72191
Use a reference function for that:
reference(resourceId('resourcegroupName', 'Microsoft.Automation/automationAccounts/configurations', 'automationAccountName', 'configurationName'), 'api-version')
Upvotes: 1