-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nested template inline with resource copy #10
Comments
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: |
did you find an answer/workaround to this ? |
Yeah, I stopped using nested inline templates. |
Having the same problem myself. |
This still seems to be an issue using even the latest API - 2018-05-01 |
I worked around the issue by looping outside of the nested template |
Did you find any workaround to this? I have this piece of resource which I want to iterate couple of times |
Sorry to bump up an older topic, but I can repro this issue with the copy function and nested templates as well. |
Anything on this yet? |
There is a NestedTemplateInline.json template which can be used also for cross resource group deployments in your repo. It even has a copyIndex() usage example, but it uses property copy iteration.
I have a template in which I want to do cross resource group deployment and inside the inline template I moved resources that were deployed using resource iteration method (earlier they were in root template and deployment worked), but when I try to deploy it I get error message - "...Microsoft.Resources/deployments... The template function 'copyIndex' is not expected at this location. The function can only be used in a resource with copy specified." Is it a bug or by design? Because it looks like only property copy syntax is allowed in nested inline template. But I have some resources and a bunch of alerts configured inside the nested template, so I can't use property iteration syntax.
The text was updated successfully, but these errors were encountered: