Outputs can be created in Farmer for any ARM Expression, Resource Name or any optional string. ARM Expressions are most useful in this case for referring to values that only exist at deployment time, such as connection strings.
Farmer ARM expressions are in reality just wrapped strings, and are easy to create. For example, the code to create a Storage Key property is similar to this:
let buildKey accountName : ArmExpression = // Create the raw string of the expression let rawValue = sprintf "concat('DefaultEndpointsProtocol=https;AccountName=%s;AccountKey=', listKeys('%s', '2017-10-01').keys.value)" accountName accountName // Wrap the raw value in an ARM Expression and return it ArmExpression rawValue
Notice that you do not wrap the expression in square brackets [ ]; Farmer will do this when writing out the ARM template.
ARM expressions also have the following members on them:
Map- standard map
Bind- standard bind
Value- Returns the raw string value
Eval- Returns the string as a formatted ARM expression i.e. surround in