-
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
Trying to create a list variable in a workspace fails #40
Comments
Looking at the source code, it is just passing through a string value to the terraform client, so either the backend isn't respecting the hcl flag or there is a different way to pass the list value as a string. |
Very good question @sethbacon! The value is indeed passed through 1:1, so I will need to take a closer look to see what exactly happens here. Will try to make some time for that tomorrow. |
Thanks, let me know if I can provide any additional information. |
Customer support offered this as a solution: |
That was exactly what I was also going to test just now 😉 It will not be possible to have this one value take in different types (e.g. Only when that is done, we can update the schema so it can take in these different types correctly. So until that time we are limited to the solution (that thankfully works) which support suggested. |
Having a similar issue using a MAP. Difference here is that I can get the map string to work with open source terraform on Windows and it is not parsing correctly in Linux. resource "tfe_variable" "test6" { The escape character works in Windows and creates the TFE variables but errors in Linux. Have tried multiple variations of escape characters and quotes but cant get it to recognize the string as hcl. |
@Kimnor if I use this config on my mac it seems to work as expected:
I don't get any errors and see this variable in TFE: Can you test if this works for you as well? |
@svanharmelen Thank you. That is exactly the code I pasted into the browser. I appears to have removed my \s in the text above. when I hit the submit button. |
Ah, glad to hear that it's fixed now 👍 I'll go ahead and close this issue as there isn't much we can do to improve this for the coming months. And when we are able to change the schema that will be a new topic on its own. Feel free to reopen this issue or open a new issue if there are any follow up questions. |
Donno if this will be useful for y'all. But here is a workaround using heredoc and template directive
|
Hi @MichaelAngVTS , |
Trying to create a tfe_variable resource with a value of list gives: Error tfe_variable.availability_zones: value must be a single value, not a list
Latest .11.10
resource "tfe_variable" "availability_zones" {
hcl = true
key = "availability_zones"
value = ["us-east-1a","us-east-1b","us-east-1c"]
category = "terraform"
workspace_id = "${tfe_workspace.nc_use1_inf_dev_net.id}"
}
I've tried re-writing the value with various quote methodologies. Am I doing something wrong or is this not handled by provider?
The text was updated successfully, but these errors were encountered: