Skip to content

Instantly share code, notes, and snippets.

@GeradeDev
Created November 10, 2020 17:09
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 GeradeDev/2254f57be56ac2bf7762a326e0827259 to your computer and use it in GitHub Desktop.
Save GeradeDev/2254f57be56ac2bf7762a326e0827259 to your computer and use it in GitHub Desktop.
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"StorageAccountName": {
"type": "String",
"defaultValue": "storage2020"
}
},
"variables": {
"templatelink": "C:/Projects/demoARM/templates/newStorageAccount.json"
},
"functions": [
{
"namespace": "finance",
"members": {
"prefixDepartment": {
"parameters": [
{
"name": "resourceName",
"type": "string"
}
],
"output": {
"type": "string",
"value": "[concat('financeDep-', toLower(parameters('resourceName')))]"
}
}
}
}
],
"resources": [
{
"apiVersion": "2015-01-01",
"name": "nestedTemplate",
"type": "Microsoft.Resources/deployments",
"properties": {
"mode": "incremental",
"templateLink": {
"uri": "[variables('templatelink')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"StorageAccountName": {
"value": "[finance.prefixDepartment(parameters('StorageAccountName'))]"
}
}
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment