Skip terraform interpolation inside inline script

Viewed 92

I have an inline script and I'm trying to do a string replace in bash like this

INPUT="Holis"
NEW_VALUE=${INPUT//[A-Z]/_}

But terraform thinks I want to do a interpolation with ${}

How can I "skip" this interpolation inside the inline script

1 Answers

Just use double dollar sign at the beginning

NEW_VALUE=$${INPUT//[A-Z]/_}
Related