Created
September 8, 2017 17:51
-
-
Save krnese/26217923cad205e042cdaabe1d0a3331 to your computer and use it in GitHub Desktop.
Azure Automation - reference() and listKeys() example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$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