Closed StefanIvemo closed 3 years ago
This is currently intentionally unsupported and is unlikely to change. This is similar to global symbol names in that it is more restrictive than what is possible in ARM Templates. Can you provide a bit more detail on why you need identifiers with leading integers? There could certainly be a scenario we have not though through.
FWIW, this is not something that is possible in most high level programming languages like TS, C# or Go
It's not something I intend to use. Just stumbled upon it yesterday and noticed the difference and got curious since it is working in ARM Templates. And I couldn't find any info in the docs either. Maybe the error description could be updated? Anyway you can close this, I'm happy with your explanation.
@alex-frankel forgot to mention in the issue that if I run bicep decompile
on an ARM Template with leading numbers in the parameter or variable name it will generate an error and the converted .bicep
file will not work. Maybe if a parameter or variable in an ARM Template has leading numbers in the names it should be changed during decompilation?
Sounds good - I will close this one and open a separate one for the decompiler error
Bicep version Bicep CLI version 0.2.328 (a13b032755)
Describe the bug ARM Templates support leading numbers in parameter and variable names for example:
If try to do the same with Bicep it's not allowed.
To Reproduce
If my template looks like this:
VS Code extension shows the following error:
And
bicep build
throws this error:If I declare a variable:
VS Code Extension and Bicep Build generates the same error:
Error BCP015: Expected a variable identifier at this location.
And I get the same error if I try to do name my resource or module identifier with a leading number in the identifier name.
Additional context Add any other context about the problem here.