Skip to content

Conversation

@stephybun
Copy link
Member

What

This PR adds documentation for the newly introduced query testing mode as well as the accompanying query checks

What was added:

  • New section specific to query-checks containing
  • New TestSteps subsection for query mode

What changed:

  • TestSteps page was updated to include mentions and references to the new query mode

Why

Terraform introduced a new language construct which users will likely want to know how to test.

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.

@stephybun stephybun requested review from a team as code owners December 4, 2025 12:21
@github-actions
Copy link
Contributor

github-actions bot commented Dec 4, 2025

Vercel Previews Deployed

Name Status Preview Updated (UTC)
Dev Portal ✅ Ready (Inspect) Visit Preview Thu Dec 4 12:56:42 UTC 2025
Unified Docs API ✅ Ready (Inspect) Visit Preview Thu Dec 4 12:50:01 UTC 2025

@github-actions
Copy link
Contributor

github-actions bot commented Dec 4, 2025

Broken Link Checker

No broken links found! 🎉

Copy link
Contributor

@SBGoods SBGoods left a comment

Choose a reason for hiding this comment

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

I've added a couple of suggestions, but none of it is blocking. Otherwise, LGTM!

"path": "acceptance-tests/query-checks"
},
{
"title": "Query Result Query Checks",
Copy link
Contributor

Choose a reason for hiding this comment

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

I think having "Query" here twice is a little wordy and we can just shorten it to "Query Result Checks"

Suggested change
"title": "Query Result Query Checks",
"title": "Query Result Checks",

@@ -0,0 +1,95 @@
---
page_title: 'Plugin Development - Acceptance Testing: Query Checks'
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
page_title: 'Plugin Development - Acceptance Testing: Query Checks'
page_title: 'Plugin Development - Acceptance Testing: Custom Query Checks'

---

# Query Checks
During the **Query** [mode](/terraform/plugin/testing/acceptance-tests/teststep#test-modes) of a `TestStep`, the configuration supplied is used as the contents of a `.tfquery.hcl` query file and the testing framework will run `terraform query`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
During the **Query** [mode](/terraform/plugin/testing/acceptance-tests/teststep#test-modes) of a `TestStep`, the configuration supplied is used as the contents of a `.tfquery.hcl` query file and the testing framework will run `terraform query`.
During the **Query** [mode](/terraform/plugin/testing/acceptance-tests/teststep#test-modes) of a `TestStep`, the configuration supplied is used as the content of a `.tfquery.hcl` query file and the testing framework will run `terraform query`.

provides built-in Query Checks for common use-cases.
---

# Query Result Query Checks
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# Query Result Query Checks
# Query Result Checks

@@ -0,0 +1,338 @@
---
page_title: 'Plugin Development - Acceptance Testing: Query Checks'
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
page_title: 'Plugin Development - Acceptance Testing: Query Checks'
page_title: 'Plugin Development - Acceptance Testing: Query Result Checks'

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants