Skip to content
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

Error binding to Cloud SQL instance #123

Open
stephen-opal opened this issue Aug 25, 2021 · 3 comments
Open

Error binding to Cloud SQL instance #123

stephen-opal opened this issue Aug 25, 2021 · 3 comments

Comments

@stephen-opal
Copy link

Hi there, I receive the following error when I attempt to bind to a Cloud SQL instance:

$ vault write gcp/roleset/my-token-roleset \
    project="test-project-2" \
    secret_type="access_token"  \
    token_scopes="https://www.googleapis.com/auth/cloud-platform" \
    bindings=-<<EOF
  resource "//cloudsql.googleapis.com/projects/test-project-2/instances/my-test-db" {
    roles = ["roles/cloudsql.instanceUser"]
  }
EOF
Error writing data to gcp/roleset/my-token-roleset-2: Error making API request.

URL: PUT http://127.0.0.1:8200/v1/gcp/roleset/my-token-roleset-2
Code: 400. Errors:

* invalid resource "//cloudsql.googleapis.com/projects/test-project-2/instances/my-test-db": unsupported service cloudsql for resource projects/instances

Is this unexpected? Or is Cloud SQL simply not supported at the moment? If not, what's the recommended way of using Vault to manage access to Cloud SQL instances?

Thanks so much!

@sa1i
Copy link

sa1i commented Jun 28, 2022

Same error.
@jasonodonnell @austingebauer can you give us some advices?

thanks!

@austingebauer
Copy link
Member

@stephen-opal, @sa1i - I'm having a look at this now. Will get back to you here shortly!

@austingebauer
Copy link
Member

Hi @stephen-opal - My apologies for the long delay here. It appears that Cloud SQL is not in the list of resources that can be managed by this secrets engine. I've raised this with my team to look into. We need to regenerate the resources we support to include Cloud SQL.

We do have a feature coming out in an upcoming Vault release that allows for management of Cloud SQL users via Vault's database secrets engine. I think this (GCP secrets engine) use case would be slightly different, but I thought it was worth mentioning if you're looking for a solution.

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

No branches or pull requests

3 participants