Closed mgzenitech closed 2 years ago
String interpolation requires double quotes in Ruby 😄
So this should work:
terraform {
backend "s3" {
bucket = "<%= normalize("ts-state-#{seed}") %>"
}
}
Also, testing in an interactive ruby client IRB can help to figure things out. Example:
$ irb
3.1.1 :001 > x = "bar"
=> "bar"
3.1.1 :002 > y = "foo-#{x}"
=> "foo-bar"
3.1.1 :003 > z = 'foo-#{x}'
=> "foo-\#{x}"
3.1.1 :004 >
Checklist
My Environment
Expected Behaviour
Current Behavior
Step-by-step reproduction instructions
Code Sample
Solution Suggestion