Skip to content
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

copyIndex for datadisks not working? #2

Closed
aoby01 opened this issue May 17, 2017 · 2 comments
Closed

copyIndex for datadisks not working? #2

aoby01 opened this issue May 17, 2017 · 2 comments

Comments

@aoby01
Copy link

aoby01 commented May 17, 2017

Hi,

following https://azure.microsoft.com/en-gb/resources/videos/build-2017-azure-resource-manager-templates-life-after-first-deployment/ i was drawn here and tried the mechanism used in https://github.com/rjmax/Build2017/blob/master/Act1.TemplateEnhancements/Chapter02.PropertyCopies.json using copy to extend the storage-profile datadisks.

This however does not seem to work out for me:
statusCode:BadRequest statusMessage:{"error":{"code":"InvalidTemplate","message":"Unable to process template language expressions for resource 'XXX' at line '1' and column '2360'. 'The template function 'copyIndex' is not expected at this location. The function can only be used in a resource with copy specified. Please see https://aka.ms/arm-copy for usage details.'"}}

"copy": [
{
"name": "dataDisks",
"count": "3",
"input": {
"diskSizeGB": "1000",
"lun": "[copyIndex('dataDisks')]",
"createOption": "Empty"
}
}
]

I set the api versions according to the one in the templates and i am running this in westeurope region.
Is there anything else needed to get this running?

Thanks and cheers

@rjmax
Copy link
Owner

rjmax commented Jun 29, 2017

There was a regression the week after //build; this should be working now :)

@aoby01
Copy link
Author

aoby01 commented Jun 29, 2017

Thanks - i retried and i can confirm that it works now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants