Skip to content

test(examples): Add credential-free documentation example harness - #382

Draft
thedriftofwords wants to merge 6 commits into
mainfrom
cg/DOCS-3002-terraform-example-harness
Draft

test(examples): Add credential-free documentation example harness#382
thedriftofwords wants to merge 6 commits into
mainfrom
cg/DOCS-3002-terraform-example-harness

Conversation

@thedriftofwords

@thedriftofwords thedriftofwords commented Jul 31, 2026

Copy link
Copy Markdown

Summary

  • Adds a credential-free harness that validates registered Terraform documentation examples with terraform fmt -check, terraform init -backend=false, and terraform validate.
  • Exposes the command as make -f GNUmakefile test-examples and runs it in CI.
  • Documents the command and registration workflow in examples/README.md.

Dependency

Draft until coreweave/terraform-provider-coreweave#304 merges.

This branch is rebased on PR #304 so the harness validates the updated bucket policy examples, including required_providers and named principal ARNs. After #304 lands, rebase this branch onto main and mark ready for review.

Related: DOCS-3002

Test plan

Design notes

  • Default harness is credential-free and stops at validate (no plan or apply).
  • Examples are copied to temporary directories before validation so source trees stay clean.
  • Register additional examples by adding paths to tools/test-examples.sh.

Made with Cursor

thedriftofwords and others added 6 commits July 30, 2026 12:00
Declare the CoreWeave provider source so copied examples resolve the correct provider and support Terraform initialization.

Co-authored-by: Cursor <cursoragent@cursor.com>
Replace org-wide CW wildcard principals with one console user and one SAML group ARN, keeping cw:PrincipalOrgID as an extra safety measure.

Co-authored-by: Cursor <cursoragent@cursor.com>
Validate registered Terraform examples with fmt, init, and validate in isolated temporary directories. Expose the command as make test-examples and run it in CI.

Co-authored-by: Cursor <cursoragent@cursor.com>
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