Problem
When trying to use the /workspaces/:workspace_id/vars endpoint, the following error is thrown:
Workspace ID: [ID_VALUE]
###############
This does not work using Workspace ID [ID_VALUE]
{"errors":[{"status":"404","title":"not found"}]}
###############
This does not work using hard coded Workspace [ID_VALUE]
{"errors":[{"status":"404","title":"not found"}]}
###############
Cause
The /workspaces/:workspace_id/vars API endpoint was added in Terraform Enterprise v202001-1
.
Solution
The solution to this issue is to upgrade to v202001-1
or later. Alternatively, an environment that is running an earlier version of Terraform Enterprise can use the /vars API endpoint instead.
Additional Information
Further documentation on the /vars endpoint.