Skip to content

Conversation

@rageshganeshkumar
Copy link
Contributor

@rageshganeshkumar rageshganeshkumar commented Dec 16, 2025

What

Added documentation for the /workspaces/:workspace_id/all-vars API endpoint in the Workspace Variables API reference page.

Changed pages:

  • content/terraform-docs-common/docs/cloud-docs/api-docs/workspace-variables.mdx

Why

The /all-vars endpoint was previously undocumented. This endpoint returns all variables accessible to a workspace, including variables defined directly on the workspace and variables inherited from variable sets (global and scoped). This is useful for users who need to see the complete variable configuration with precedence rules applied, as the endpoint automatically filters out overwritten variables and shows only the effective variables.

Screenshots


Merge Checklist

If items do not apply to your changes, add (N/A) and mark them as complete.

Pull Request

  • Description links to related pull requests or issues, if any.

Content

  • You added redirects to content/terraform-docs-common/redirects.jsonc for moved, renamed, or deleted pages across all affected versions. Refer to Redirects for examples and guidance.
  • Links to related content where appropriate (e.g., CLI, language, API endpoints, permissions, etc.).
  • Pages with related content are updated and link to this content when appropriate.
  • Sidebar navigation files have been updated for added, deleted, reordered, or renamed pages.
  • New pages have metadata (page name and description) at the top.
  • New images are 2048 px wide. They have HashiCorp standard annotation color (#F92672) and format (rectangle with rounded corners), blurred sensitive details (e.g. credentials, usernames, user icons), and descriptive alt text in the markdown for accessibility.
  • New code blocks have the correct syntax and line breaks to eliminate horizontal scroll bars.
  • UI elements (button names, page names, etc.) are bolded.
  • The Vercel website preview successfully deployed.

Reviews

  • I or someone else reviewed the content for technical accuracy.
  • I or someone else reviewed the content for typos, punctuation, spelling, and grammar.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 16, 2025

Vercel Previews Deployed

Name Status Preview Updated (UTC)
Dev Portal ✅ Ready (Inspect) Visit Preview Tue Dec 16 09:53:59 UTC 2025
Unified Docs API ✅ Ready (Inspect) Visit Preview Tue Dec 16 09:49:28 UTC 2025

@github-actions
Copy link
Contributor

Broken Link Checker

No broken links found! 🎉

Comment on lines +205 to +210
When multiple variables share the same key and category, HCP Terraform applies the following precedence order (highest to lowest):

1. Variables defined directly on the workspace
2. Variables from variable sets scoped to the workspace
3. Variables from variable sets scoped to the workspace's project
4. Variables from global variable sets

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. The precedence rules for variables aren't exactly this simple. There's global scopes and other nuances to the precedence order. The precedence order is already available on the public docs, so maybe we can skip it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants