I'm trying to debug my first Bicep template.
How can I just write a variable or parameter value to standard output?
Something like:
var hello = 'hello world!'
write-host(hello)
The best is to use module outputs which you can read from Portal. Module deployments are separate deployments visible in the "Deployments" section of resource group / subscription / etc. Even if the top-level deployment will fail, outputs from modules inside that were successful can be read, alongside parameters they took.
Remember, that bicep is a declarative language, not imperative, so the file is not being processed sequentially.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With