Closed Svessir closed 3 years ago
@Svessir - do you have the full template that you used to reproduce this behavior? Comments & whitespace are not preserved today, but we should not be changing any of the actual code, so this would indeed be very strange if this was happening.
This is only impacting the Az CLI client. @detienne20 will investigate further.
@Svessir : As a workaround you can utilize the Az Powershell cmdlets until this is fixed...
We investigated and found the root cause. A fix should be deployed next week. In the meantime, you can use Az Powershell or escape the newlines with “\n” as a workaround.
Closing - this fix should be deployed in the latest version of Az
I have been using new lines and indents in expressions to make them more readable in my templates. Example:
This works well when I deploy the template normally but when creating a template spec I can see comments and such are removed from the template. Looking at the template in the template spec I would see the above example processed to:
The worst thing is that the template spec will be created successfully instead of throwing an error.