You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I am logging this as bug as I was not expecting this behavior.
To Reproduce
So I had the following scenario. I have Bicep template that has output. The output is of type string. The output value is assigned via resource property. We have found out that the property sometimes can be null. When the value null is passed this fails the deployment as the value of the output needs to be string and cannot be null. The solution was to add ? after string and that way we could allow the value to be null. But turned out as soon as you add ? it converts the ARM template to language version 2. I was not aware that using ? at that place turns it to language version 2. Because of language version 2 that broke the usage of existing syntax as there are a lot of known issues with using existing syntax and language version 2 (#13674 and #13937). The simplest way to reproduce is below:
Bicep version
Bicep CLI version 0.30.3 (2f0e78d)
Describe the bug
I am logging this as bug as I was not expecting this behavior.
To Reproduce
So I had the following scenario. I have Bicep template that has output. The output is of type string. The output value is assigned via resource property. We have found out that the property sometimes can be null. When the value null is passed this fails the deployment as the value of the output needs to be string and cannot be null. The solution was to add ? after string and that way we could allow the value to be null. But turned out as soon as you add ? it converts the ARM template to language version 2. I was not aware that using ? at that place turns it to language version 2. Because of language version 2 that broke the usage of existing syntax as there are a lot of known issues with using existing syntax and language version 2 (#13674 and #13937). The simplest way to reproduce is below:
main.bicep
this generates to language version 1.
this generates to language version 2.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: