Skip to content

feat: add Terraform IAM support for BigQuery Routines#17754

Open
shubham643 wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
shubham643:bq-routine-acl-tf
Open

feat: add Terraform IAM support for BigQuery Routines#17754
shubham643 wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
shubham643:bq-routine-acl-tf

Conversation

@shubham643
Copy link
Copy Markdown

@shubham643 shubham643 commented May 27, 2026

Description

This pull request adds first-class Terraform IAM support for BigQuery Routines (google_bigquery_routine_iam_policy, google_bigquery_routine_iam_binding, google_bigquery_routine_iam_member).

BigQuery Routines expose standard Resource Manager REST API methods (POST /bigquery/v2/projects/*/datasets/*/routines/*:setIamPolicy and :getIamPolicy). Following the established pattern for BigQuery Tables, this change leverages MMv1's auto-generation engine by adding the iam_policy configuration block to Routine.yaml, overriding the requested policy version to 1 to ensure backend API compatibility.

Tracking Bug(s)

  • Buganizer: b/362878595, b/399046627

Design & API Documentation

Acceptance Tests

  • Ran manual E2E verification via local terraform apply against test project spgindia-test-400206. Successfully established and verified google_bigquery_routine_iam_binding.
  • Ran automated E2E acceptance tests (make testacc TEST=./google/services/bigquery TESTARGS="-run=TestAccBigqueryRoutineIam"). All E2E test steps (binding, member, policy) passed successfully.
  • Automated VCR presubmit test suite will execute via @GoogleCloudPlatform/terraform-autotest-contributors.

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.

bigquery: added IAM support (`google_bigquery_routine_iam_policy`, `google_bigquery_routine_iam_binding`, `google_bigquery_routine_iam_member`) for `google_bigquery_routine`

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label May 27, 2026
@github-actions github-actions Bot requested a review from c2thorn May 27, 2026 23:01
@github-actions
Copy link
Copy Markdown

Googlers: For automatic test runs see go/terraform-auto-test-runs.

@c2thorn, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look.

You can help make sure that review is quick by doing a self-review and by running impacted tests locally.

@shubham643 shubham643 force-pushed the bq-routine-acl-tf branch 2 times, most recently from 77573fb to 8a99cce Compare May 27, 2026 23:15
@modular-magician modular-magician added service/bigquery and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels May 29, 2026
@modular-magician
Copy link
Copy Markdown
Collaborator

modular-magician commented May 29, 2026

Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 8a99cce:

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 4 files changed, 853 insertions(+)
google-beta provider View Diff 4 files changed, 853 insertions(+)
terraform-google-conversion View Diff 2 files changed, 388 insertions(+)

Test report

Analytics

Total Tests Passed Skipped Affected
155 142 10 3
Affected Service Packages
  • bigquery

Learn how VCR tests work


Step 1: Replaying Mode

Action taken

Found 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit.

Click here to see the affected tests
  • TestAccBigQueryRoutineIamBindingGenerated
  • TestAccBigQueryRoutineIamMemberGenerated
  • TestAccBigQueryRoutineIamPolicyGenerated

View the replaying VCR build log


Step 2: Recording Mode

Recording Mode Replaying Rerun Test Name
❌ Error · Log - TestAccBigQueryRoutineIamBindingGenerated
❌ Error · Log - TestAccBigQueryRoutineIamMemberGenerated
❌ Error · Log - TestAccBigQueryRoutineIamPolicyGenerated

Caution

Issues requiring attention before PR completion

🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details.

Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer.

View the recording VCR build log or the debug logs folder for detailed results.

@shubham643, @c2thorn, @wj-chen VCR tests complete for 8a99cce!

@modular-magician modular-magician requested a review from wj-chen May 29, 2026 17:48
@shubham643 shubham643 force-pushed the bq-routine-acl-tf branch from 8a99cce to 8fca19c Compare May 29, 2026 21:56
@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-approval Pull requests that need reviewer's approval to run presubmit tests service/bigquery

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants