go-tfe icon indicating copy to clipboard operation
go-tfe copied to clipboard

VariableSetVariable struct has null value for VariableSet

Open wryfi opened this issue 2 years ago • 2 comments

VariableSetVariables.List() returns a []VariableSetVariable.

VariableSetVariable has a VariableSet property, but it is always set to null in the output from VariableSetVariables.List().

I'm trying to generate a combined list of variables for a workspace that includes both workspace variables and variableset variables, and I would like to indicate the source of each variable in my program's output.

Without the VariableSet property being set on VariableSetVariable, it's rather difficult to know where a varset variable has come from without passing around extra context.

wryfi avatar Aug 03 '22 15:08 wryfi

:wave: @wryfi

Thanks for reporting! Looks like this is the root cause of the error: https://github.com/hashicorp/go-tfe/blob/b6a0fe96f407c8dd7ea0c2775e48879e2229fea1/variable_set_variable.go#L52

It's expecting a field named configurable when it should be varset. This is a bug, will submit a ticket to fix.

sebasslash avatar Aug 03 '22 16:08 sebasslash

👍 thanks @sebasslash, appreciate the quick response!

wryfi avatar Aug 03 '22 22:08 wryfi