Skip to content

docs: sync Terraform tutorials to provider 3.17.1 (round 2)#1079

Merged
adela-bytebase merged 5 commits intomainfrom
docs/terraform-tutorials-sync-3-17-1-round2
Apr 16, 2026
Merged

docs: sync Terraform tutorials to provider 3.17.1 (round 2)#1079
adela-bytebase merged 5 commits intomainfrom
docs/terraform-tutorials-sync-3-17-1-round2

Conversation

@adela-bytebase
Copy link
Copy Markdown
Contributor

Summary

  • Fix all 7 tutorial MDX files to match current terraform-provider-bytebase schema and tutorials/*.tf files
  • Removes non-existent resources (bytebase_risk), removed fields (type on user, actions on exemptions, checkers on rollout), and obsolete block structures (steps/conditions on approval flow)
  • Fixes CEL condition syntax (adds resource. prefix), policy types (DATA_QUERY replaces DISABLE_COPY_DATA/DATA_SOURCE_QUERY), payload format (typed fields replace JSON strings), and IAM member prefixes (serviceAccount:, workloadIdentity:)

Test plan

  • Verify docs build passes
  • Spot-check each tutorial part renders correctly on preview
  • Cross-reference code blocks against tutorials/*.tf in provider repo

Companion provider PR to follow with .tf file fixes.

🤖 Generated with Claude Code

Fix remaining drift between docs MDX snippets and provider schema:
- Part 1: Remove non-existent checkers block and invalid policy types
- Part 3: Replace removed project fields with current schema
- Part 4: Remove bytebase_risk, fix approval flow to use roles list
- Part 5: Replace JSON string payloads with typed payload fields
- Part 6: Remove type field from bytebase_user, add service_account/workload_identity
- Part 7: Fix workspace parent, service account prefix, add workload identity
- Part 8: Add resource. prefix to CEL conditions, remove actions field, fix exemptions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 16, 2026 08:39
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
bytebase-com Ready Ready Preview, Comment Apr 16, 2026 10:09am

Request Review

@mintlify
Copy link
Copy Markdown
Contributor

mintlify bot commented Apr 16, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
bytebase-doc 🟢 Ready View Preview Apr 16, 2026, 8:42 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Terraform tutorial MDX files to align with terraform-provider-bytebase v3.17.1 schema changes (new resources, renamed/removed fields, typed payloads, and updated CEL/IAM formats).

Changes:

  • Update tutorial Terraform examples to use current resources/fields (e.g., bytebase_service_account, bytebase_workload_identity, typed rule payloads).
  • Remove/replace obsolete concepts and resources (e.g., bytebase_risk, old approval-flow block structures, masking exception → exemption).
  • Adjust policy/resource examples to current enums and CEL/member formats.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
docs/tutorials/manage-users-and-groups-with-terraform.mdx Updates user/service-account/workload-identity examples and key points.
docs/tutorials/manage-sql-review-rules-with-terraform.mdx Migrates SQL review rule types and payloads to typed fields.
docs/tutorials/manage-projects-with-terraform.mdx Updates project configuration fields, labels, and webhook notification types.
docs/tutorials/manage-general-settings-with-terraform.mdx Removes risk policy section and updates approval flow schema example.
docs/tutorials/manage-environments-with-terraform.mdx Updates rollout and data protection policy examples to current policy types/fields.
docs/tutorials/manage-database-access-control-with-terraform.mdx Updates IAM examples for service accounts/workload identities and member prefixes.
docs/tutorials/manage-data-masking-with-terraform.mdx Updates classification schema, masking rule CEL, and masking exemption policy example.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/tutorials/manage-projects-with-terraform.mdx
Comment thread docs/tutorials/manage-projects-with-terraform.mdx
Comment thread docs/tutorials/manage-users-and-groups-with-terraform.mdx
Comment thread docs/tutorials/manage-general-settings-with-terraform.mdx
Comment thread docs/tutorials/manage-data-masking-with-terraform.mdx
Comment thread docs/tutorials/manage-data-masking-with-terraform.mdx
- Part 1: Update provider version from 3.8.6 to 3.17.1
- Part 2: Fix data source IDs to match tutorial .tf files
- Part 4: Fix external_url placeholder to match tutorial

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix stale "exception" wording and file link to match the actual
tutorial filename (8-5-masking-exemption.tf).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Part 4: Mark source as optional in approval flow description
- Part 6: Add resource table for bytebase_service_account and
  bytebase_workload_identity

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The Advanced Configuration section used old-style lowercase dot-separated
rule type (table.require-pk) instead of UPPERCASE (TABLE_REQUIRE_PK),
inconsistent with the rest of the tutorial.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@adela-bytebase adela-bytebase merged commit d4ef4b4 into main Apr 16, 2026
5 checks passed
@adela-bytebase adela-bytebase deleted the docs/terraform-tutorials-sync-3-17-1-round2 branch April 16, 2026 10:27
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.

3 participants