Skip to content

add support for managing Cloud SQL users with database roles#16202

Merged
ScottSuarez merged 3 commits into
GoogleCloudPlatform:mainfrom
schen59:dev
Jan 28, 2026
Merged

add support for managing Cloud SQL users with database roles#16202
ScottSuarez merged 3 commits into
GoogleCloudPlatform:mainfrom
schen59:dev

Conversation

@schen59
Copy link
Copy Markdown
Member

@schen59 schen59 commented Jan 23, 2026

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.

sql: added `database_role` field and `iam_email` field to `google_sql_user` resource to support managing Cloud SQL users with database roles.

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Jan 23, 2026
@github-actions github-actions Bot requested a review from ScottSuarez January 23, 2026 17:18
@github-actions
Copy link
Copy Markdown

Hello! I am a robot. Tests will require approval from a repository maintainer to run.

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

@ScottSuarez, 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.

@modular-magician modular-magician added service/sqladmin-infra and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Jan 26, 2026
@modular-magician
Copy link
Copy Markdown
Collaborator

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

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 3 files changed, 411 insertions(+), 8 deletions(-))
google-beta provider: Diff ( 3 files changed, 411 insertions(+), 8 deletions(-))

Missing doc report (experimental)

The following resources have fields missing in documents.

  • google_sql_user
    • Expected Document Path: /website/docs/r/sql_user.html.markdown
    • Fields: [database_roles iam_email]

@modular-magician
Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 143
Passed tests: 111
Skipped tests: 27
Affected tests: 5

Click here to see the affected service packages
  • sql

Action taken

Found 5 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccSqlUser_mysql_createUserWithDatabaseRoles
  • TestAccSqlUser_mysql_updateUserWithDatabaseRoles
  • TestAccSqlUser_password_wo
  • TestAccSqlUser_postgres
  • TestAccSqlUser_postgres_updateUserWithDatabaseRoles

Get to know how VCR tests work

@modular-magician
Copy link
Copy Markdown
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccSqlUser_mysql_createUserWithDatabaseRoles [Debug log]
TestAccSqlUser_mysql_updateUserWithDatabaseRoles [Debug log]
TestAccSqlUser_password_wo [Debug log]
TestAccSqlUser_postgres [Debug log]
TestAccSqlUser_postgres_updateUserWithDatabaseRoles [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🟢 All tests passed!

View the build log or the debug log for each test

@github-actions
Copy link
Copy Markdown

@ScottSuarez This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.

@ScottSuarez ScottSuarez added this pull request to the merge queue Jan 28, 2026
Merged via the queue into GoogleCloudPlatform:main with commit 0446df7 Jan 28, 2026
29 of 30 checks passed
@melinath
Copy link
Copy Markdown
Member

melinath commented Feb 4, 2026

Missing doc report (experimental)

The following resources have fields missing in documents.

  • google_sql_user

    • Expected Document Path: /website/docs/r/sql_user.html.markdown
    • Fields: [database_roles iam_email]

@schen59 it looks like the docs for these fields are missing; could you add them?

hashicorp/terraform-provider-google#10438 (comment) mentioned this as well.

@schen59
Copy link
Copy Markdown
Member Author

schen59 commented Feb 4, 2026

@melinath thanks for catching this! I sent out #16300 to add the missing docs. Thanks!

wuchris-g pushed a commit to wuchris-g/magic-modules that referenced this pull request Feb 5, 2026
JianweiQ pushed a commit to JianweiQ/magic-modules that referenced this pull request Feb 20, 2026
aditikumarii-google pushed a commit to aditikumarii-google/magic-modules that referenced this pull request Mar 10, 2026
ChuAmberZhang pushed a commit to ChuAmberZhang/magic-modules that referenced this pull request Apr 29, 2026
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.

4 participants