You can escape dollar signs with a backslash or with another dollar sign. So $, $$, and \$ all replace with a single dollar sign.
Interpolations use this escape to splice in arguments, and it can also be used to escape itself as the sequence $$ to represent a literal $ character. Because of its special handling during the parse, the $ could be used to escape a " character to represent a literal " withing a string.
route_name} as literally ${var. route_name} , and not as a string interpolation at all. To avoid this, you can use any strategy that causes the initial $ to be separate from the following ${ , so that Terraform will understand the first $ as a literal and the remainder as an interpolation sequence.
Kotlin has "multiline strings". All of the Kotlin strings support string interpolation with the $ character. It can be escaped as \$ in single line strings, but cannot be currently escaped withing multiline strings.
Just double it
scala> val name = "foo"
name: String = foo
scala> s"my.package.$name$$"
res0: String = my.package.foo$
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With