Azure / Azure/azure-quickstart-templates
Minor typos in expression syntax in 2 templates
- Dominant language
- Bicep
- Stars
- 14.9k
- Forks
- 16.2k
- Avg merge
- 6d 21h
- Merged PRs (30d)
- 6
Description
### Affected Templates
+ [media-service-output-primary-key](https://github.com/Azure/azure-quickstart-templates/tree/master/media-service-output-primary-key)
+ [orchard-cms-video-portal](https://github.com/Azure/azure-quickstart-templates/tree/master/orchard-cms-video-portal)
### 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:
+ [remove providers().apiVersion[] calls](https://github.com/Azure/azure-quickstart-templates/commit/14b217398cea9cdb1c7d1ce4f46e8dc05d6208ec)
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?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the media-service-output-primary-key and orchard-cms-video-portal template directories, then inspect the two locations identified in commit 14b2173. Correct the malformed ARM expressions to use the intended hard-coded API version and validate that both templates contain valid expression syntax.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure
- Domain
- cloud
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100