Concatenate declared variable with random string
Hi, It is possible, using Terratest, to declare a tfvars file with the following variable: ``` bar = { name = "test" domain = "test.com" regions = [ { location = "France Central", alias = "france" } ] } ``` But include a random prefix to the bar.domain string inside the go code? I'm using terraformOptions as follows: ``` terraformOptions := &terraform.Options{ TerraformDir: sourcePath, VarFiles: []string{variablesPath + "/integration.tfvars"}, } ``` --- <ins datetime="2022-05-24T18:19:52Z"> <p><a href="https://support.gruntwork.io/hc/requests/108656">Tracked in ticket #108656</a></p> </ins>
Terratest currently doesn't have a feature to manipulate var files. To achieve what you want, the best way is to use `Vars` so you set the variable directly in the go code, instead of through static var files.