Using expr
Use the expr expression language in bricks.json for dynamic configuration, conditional logic, string operations, and runtime property references.
What is expr?
Common Use Cases
Examples
1. Concatenating strings and using current time
{
"packages": [
{
"name": "my_s3_bucket",
"version": "1.0.0",
"props": {
"bucket_name": {
"value": "now().Format('02012006030405')+'_sample_bucket'+(Props.vpc_id ?? Data.vpc1.vpc_id)"
}
}
}
]
}2. Conditional Logic (Ternary Operator)
3. Accessing nested properties and list elements
4. Null coalescing for fallbacks
5. String concatenation
6. Mathematical operations
7. Complex conditional logic
8. Output aggregation with expressions
Best practices
Further reading
Last updated
Was this helpful?

