Is there a way to do string concatenation in variable interpolation

Hi, for template variables, is there a way to concatenate a variable and a string?

e.g. : ${var.a || var.b + “somestring”}

Only the ‘+’ sign does not work for strings, ‘join’ requires a non-empty separator, ‘concat’ is for arrays.

Hi @michaeld! Unfortunately, now there is no such way to do that. We’ll fix this by overloading + operator and modifying concat helper function to support string concatenation.

This should be quite an easy fix, so it will likely be released in Garden 0.12.46,

Now it’s implemented in https://github.com/garden-io/garden/pull/3300 and improvement(template): string concatenation with `concat` function by vvagaytsev · Pull Request #3303 · garden-io/garden · GitHub. Both will be released in 0.12.46.