Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to write a variable/parameter to stdout?

Tags:

azure-bicep

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)
like image 643
Nathan Avatar asked Feb 11 '26 00:02

Nathan


1 Answers

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.

like image 164
Miq Avatar answered Feb 16 '26 09:02

Miq



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!