Skip to content

Latest commit

 

History

History
35 lines (29 loc) · 1.27 KB

outputs.md

File metadata and controls

35 lines (29 loc) · 1.27 KB

Outputs

Output declarations will be compiled into template outputs and are used to return information back out from the template deployment. See Template Parameter Syntax Reference for more information. The value of an output is any value literal or any expression.

There are no constraints on placement of output declarations. They can be mixed with any other valid declarations in any order.

String output

output myEndpoint string = myResource.properties.endpoint

Integer output

The following declares a hard-coded integer output and sets the value to 42.

output myHardcodedOutput int = 42

Object output

The following declares an object output that returns information about the resourceGroup:

output myResourceGroup object = resourceGroup()

Boolean output

The following declares a boolean output value and sets the value using an expression.

output isInputParamEmpty bool = length(myParam) == 0

Array output

The following declares an array output and computes the value using a loop.

output myLoopyOutput array = [for myItem in myArray: {
  myProperty: myItem.myOtherProperty
}]