This data source is used to retrieve all variables defined in a specified workspace
For workspace variables:
data "tfe_workspace" "test" {
name = "my-workspace-name"
organization = "my-org-name"
}
data "tfe_variables" "test" {
workspace_id = data.tfe_workspace.test.id
}
For variable set variables:
data "tfe_variable_set" "test" {
name = "my-variable-set-name"
organization = "my-org-name"
}
data "tfe_variables" "test" {
variable_set_id = data.tfe_variable_set.test.id
}
One of following arguments are required:
workspace_id
- ID of the workspace.variable_set_id
- ID of the workspace.variables
- List containing all terraform and environment variables configured on the workspaceterraform
- List containing terraform variables configured on the workspaceenv
- List containing environment variables configured on the workspaceThe variables, terraform and env
blocks contains:
id
- The variable Idname
- The variable Key namevalue
- The variable value. If the variable is sensitive this value will be empty.category
- The category of the variable (terraform or environment)sensitive
- If the variable is marked as sensitive or nothcl
- If the variable is marked as HCL or not