Azure / azure-quickstart-templates

Azure Quickstart Templates
https://aka.ms/azqst
MIT License
13.84k stars 16.01k forks source link

Minor typos in expression syntax in 2 templates #7267

Open mikeclayton opened 4 years ago

mikeclayton commented 4 years ago

Affected Templates

Issue Details

It looks like there was a typo introduced into the ARM expression syntax in a couple of places in the above templates in this commit:

This commit replaced providers('xxx', 'yyy').apiVersions[0] with a hard-coded api version string (e.g. '2016-01-01') in a lot of templates, but the two at the top of this issue had a bit of a typo applied to them (which looks maybe like a bad search-and-replace) and the result is an invalid expression as follows.

Instead of this:

providers('xxx', 'yyy').apiVersions[0] becomes '2015-10-01'

we've got this:

providers('xxx', 'yyy').apiVersions[0] becomes providers('xxx', 'yyy')'2015-10-01'0]

Here's a link to the places where this typo appears:

media-service-output-primary-key +https://github.com/Azure/azure-quickstart-templates/commit/14b217398cea9cdb1c7d1ce4f46e8dc05d6208ec#diff-b90477dfb8304da4555ed5eecc9c54a0

orchard-cms-video-portal +https://github.com/Azure/azure-quickstart-templates/commit/14b217398cea9cdb1c7d1ce4f46e8dc05d6208ec#diff-1593b4fb5902f184ad01c8e10b1654f0

I'll send a PR with the fixes as soon as I can.

Incidentally, I found these while trying to write an ARM-linter to validate expression syntax here: https://github.com/KingslandConsulting/Kingsland.ArmLinter. If I get it fully working it might be useful to run as part of the CI process to validate templates in the azure-quickstart-templates repo?

MCKLMT commented 3 years ago

I think this is expected. @bmoore-msft can you confirm please?

bmoore-msft commented 3 years ago

No, it looks like a bug in both templates (which would certainly cause them to fail to deploy) - so PRs with fixes would be welcome ;)