-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added PSC Private Service Connect for GCP CloudSQL #27889
Open
shinji62
wants to merge
14
commits into
hashicorp:main
Choose a base branch
from
shinji62:feature/add_psc_google_database
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 8 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
49d9118
Added PSC Private Service Connect for GCP CloudSQL
shinji62 b90ab8d
Added changelog
shinji62 acac415
Merge branch 'main' into feature/add_psc_google_database
shinji62 c5fdb98
Merge branch 'main' into feature/add_psc_google_database
shinji62 6743547
Merge branch 'main' into feature/add_psc_google_database
shinji62 1c1e6ae
Merge branch 'main' into feature/add_psc_google_database
shinji62 b6f8f77
Update changelog
shinji62 4b26678
Value need to be exported or will be false
shinji62 d862d0b
Exported variablee for MySQL as well
shinji62 1cc6299
Merge branch 'main' into feature/add_psc_google_database
shinji62 9bdcb44
Merge branch 'main' into feature/add_psc_google_database
shinji62 b377760
Merge branch 'main' into feature/add_psc_google_database
shinji62 16b564d
Merge branch 'main' into feature/add_psc_google_database
shinji62 f3c8579
Merge branch 'main' into feature/add_psc_google_database
shinji62 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
```release-note:improvement | ||
secrets/database: Add PSC support for GCP CloudSQL MySQL and Postgresql | ||
``` | ||
```release-note:improvement | ||
secrets/database: Add PrivateIP support for MySQL | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -129,6 +129,7 @@ ALTER USER "<YOUR DB USERNAME>" WITH CREATEROLE; | |
allowed_roles="my-role" \ | ||
connection_url="host=project:us-west1:mydb [email protected] dbname=postgres sslmode=disable" \ | ||
use_private_ip="false" \ | ||
use_psc="false" \ | ||
auth_type="gcp_iam" | ||
``` | ||
|
||
|
@@ -141,6 +142,7 @@ ALTER USER "<YOUR DB USERNAME>" WITH CREATEROLE; | |
allowed_roles="my-role" \ | ||
connection_url="host=project:region:instance [email protected] dbname=postgres sslmode=disable" \ | ||
use_private_ip="false" \ | ||
use_psc="false" \ | ||
auth_type="gcp_iam" \ | ||
service_account_json="@my_credentials.json" | ||
``` | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These will be returned in the READ response for all database plugins that embed this
SQLConnectionProducer
struct. That is not ideal, since they are only relevant to a small subset of database plugins. It might be better to implement this per-plugin similar to mysql. Maybe there is some common code that could be reused by each plugin?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But this is already the case for
Which is only supported for Postgresql, but still field is available for hana, mssql, redshift
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh actually I was able to remove from the read path, when auth_type is not gcp_iam
Test (did the same test with mysql as well)
Postgresql
Write and read using auth_type
gcp_iam
Write and read using normal plugin and normal auth
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was wrong about this. See my comment here https://github.com/hashicorp/vault/pull/27889/files#r1720329947