-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tfe_variable: list(string) not supported #188
Comments
Providers fields can't handle multiple types, so it'll always have to be a string. You'll need to provide HCL—wrapping that array in |
Right, I can see that it needs to be a string. I was wondering what other folks are doing, whether they are just manually hand-coding the HCL strings? Luckily HCL lists have the same syntax has JSON lists. Definitely, it would be great to have |
Either that, or the TF Cloud API, should support JSON strings |
Yes, other than the trick of using |
We've had good mileage with the following hack, which translates hcl = replace(jsonencode(local.test), "/(\".*?\"):/", "$1 = ") |
Ugh, I just ran into this (value must be a string). Fortunately, @osterman's hack seems to work. I'd like to see the provider supporting all the valid types allowed for a variable without needing a hack. |
Being able to interpret HCL lists or maps (or other complex types) as strings would be a useful feature for cases like this. |
Hello, We now starting to move to terrafom Cloud and this seems to be a blocker for us. How are you guys managing TF Cloud variables ? Changing variables through the TF Cloud UI does not work for us I guess. We need to be able to version control variables and what changes/commit are done there. Managing the variables via the UI is not a good idea right ? I mean you do not have big control who changed what and when etc. |
Hi guys,
on terraform with aws provider
So, list of string is work fine, but map of string is not. I tested, and now, I totally change from the old way to Terraform Cloud |
In the absence of an hclencode function, I think the provider could do a much better job of doing some of the encoding work on your behalf here. I've created list(string) just happens to work because the json encoding is identical to the hcl encoding in that case. For hcl types that are simple/known, you can use template strings to reformulate hcl as an hcl string:
We'll investigate this as a feature request to encode arbitrary hcl expressions on your behalf, so I opened #727 |
It seems like
tfe_variable
does not support values where the type islist(string)
Here's the code
How do I go about doing this?
The text was updated successfully, but these errors were encountered: