{ | |
"$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