Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save krnese/26217923cad205e042cdaabe1d0a3331 to your computer and use it in GitHub Desktop.
Save krnese/26217923cad205e042cdaabe1d0a3331 to your computer and use it in GitHub Desktop.
Azure Automation - reference() and listKeys() example
{
"$schema": "http://schemas.microsoft.org/azure/deploymentTemplate?api-version=2015-01-01-preview#",
"contentVersion": "1.0",
"parameters": {
"accountName": {
"type": "string",
"metadata": {
"description": "The name of the Azure Automation account to deploy to."
}
}
},
"variables": {
"sku": "Free"
},
"resources": [
{
"name": "[parameters('accountName')]",
"type": "Microsoft.Automation/automationAccounts",
"apiVersion": "2015-01-01-preview",
"location": "[resourceGroup().location]",
"dependsOn": [],
"tags": {},
"properties": {
"sku": {
"name": "[variables('sku')]"
}
}
}
],
"outputs": {
"registrationUrl": {
"type": "string",
"value": "[reference(resourceId('Microsoft.Automation/automationAccounts/', parameters('accountName'))).RegistrationUrl]"
},
"keys": {
"type": "object",
"value": "[listKeys(resourceId('Microsoft.Automation/automationAccounts/', parameters('accountName')), '2015-01-01-preview')]"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment