I recently discovered that HCL2 can be used as a library and started working on it. I cannot find a better place and I’m not sure whether I should use Github for questions, so I’m sorry in advance if it’s the wrong place.
I created a simple HCL2 file:
name = "Meme Service"
description = "To be deployed on ${conf.region} and backup to ${conf.backupRegion}"
test "standalone" "unit-${conf.xyz}" {
script = "mvn clean install -T1C -am -amd -pl"
}
When I try to use ${conf.xyz} in the label value of a block, I get the following error:
Invalid string literal; Template sequences are not allowed in this string. To include a literal “$”, double it (as “$$”) to escape it.
It seems like an intended behavior but I wanted to learn why this is the case. Thanks!