Comments (9)
I've found another strange issue. ListKeys function also seems to not work in nested template. For example, Azure Function default template contains this code:
{
"name": "AzureWebJobsDashboard",
"value": "[concat('DefaultEndpointsProtocol=https;AccountName=',parameters('storageName'),';AccountKey=',listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('storageName')), '2015-05-01-preview').key1)]"
},
And it perfectly works in root a template, but in nested template I get an error:
The Resource 'Microsoft.Storage/storageAccounts/somestorageaccount' under resource group 'RG' was not found.
It looks like dependsOn defined on Function resource is ignored and listKeys tries to execute before storage account is created.
from armexamples.
did you find an answer/workaround to this ?
from armexamples.
Yeah, I stopped using nested inline templates.
from armexamples.
Having the same problem myself.
from armexamples.
This still seems to be an issue using even the latest API - 2018-05-01
from armexamples.
I worked around the issue by looping outside of the nested template
from armexamples.
Did you find any workaround to this? I have this piece of resource which I want to iterate couple of times
The code below is part of the master template, I use the template link (citrix-connector-vm.json) which, actually creates a VM
{
"name": "[concat('CreateConnector',copyIndex(),uniqueString(resourceGroup().id))]",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2017-05-10",
"dependsOn": [
"[resourceId('Microsoft.Compute/availabilitySets', variables('connAvailailitySetName'))]"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[concat(uri(deployment().properties.templateLink.uri,'citrix-connector-vm.json'),parameters('SasToken'))]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"virtualNetworkName": {
"value": "[parameters('virtualNetworkName')]"
},
"adSubnetName": {
"value": "[parameters('adSubnetName')]"
},
"connAvailabilitySetName": {
"value": "[variables('connAvailailitySetName')]"
},
"connVmName": {
"value": "[concat(variables('connVMName'), copyIndex())]"
},
"connVmIp": {
"value": "10.3.0.7"
},
"connAdminUsername": {
"value": "[parameters('connAdminUsername')]"
},
"connAdminPassword": {
"value": "[parameters('connAdminPassword')]"
},
"connVmSize": {
"value": "[parameters('connVmSize')]"
},
"connDiskType": {
"value": "[parameters('connDiskType')]"
},
"connImageSKU": {
"value": "[parameters('connImageSKU')]"
}
}
},
"copy": {
"name": "CopyConnectorVM",
"count": "[parameters('numberOfConnectors')]",
"mode": "Serial",
"batchSize":1
}
}
from armexamples.
Sorry to bump up an older topic, but I can repro this issue with the copy function and nested templates as well.
from armexamples.
Anything on this yet?
from armexamples.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from armexamples.