Azure ARM Template - Withdraw Automation Url and Key Account Registration at Run Time

I am trying to get the registration key and the url of my DSC Azure Automation account inside an ARM template at runtime. I tried using the same syntax as for the repository account, i.e.

listKeys(resourceId('Microsoft.Storage/storageAccounts', 'StorageAccountName'), '2015-05-01-preview').key1)

by doing the following:

listKeys(resourceId('Microsoft.Automation/automationAccounts', 'AutomationAccountName'), '2015-05-01-preview').key1)

but not luck (it seems the function just returns null). This, of course, would ensure the creation of an automation account and a virtual machine and the connection of the virtual machine to the automation account in the same template as a simple pie. Has anyone successfully got something that looks like a job?

+4
source share

All Articles