Using Bicep outputs
Outputs have been an essential part of ARM templates and remain the same for Bicep. Regardless of what you are deploying, there will be many scenarios where you need to pass a property, name, connection string, or any other information to be used later. This will be more important in cases where the deployment is happening as part of a CI/CD pipeline, and you have a dependency on one of the resources that's being deployed using Bicep.
Outputs will need to have a type, which we learned about earlier in this book. Now, let's learn how to define outputs.
Defining outputs
Outputs are in the following format:
output <name> <type> = <value>
The output
keyword is what makes this line a form of output in Bicep. It needs to be followed by a name and type and then be assigned a value. This value can be from any of the resource properties or even a variable or parameter that has been passed in. The following code block shows how to...