-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
CloudSQL: support for Private networking #2127
Comments
Hey! |
Any eta on when this might be supported? |
@sereeth / @Stono what you can do in the meantime is enable private networking using The gcloud commands are:
The |
@Stono I take it the network should be whatever network you want? i.e the network our GKE cluster uses. |
I'll be working on this. PR to follow :) |
IF this is available now, how do I configure my terraform? |
We're waiting on one final PR to merge for this to become available in the beta project: hashicorp/terraform-provider-google-beta#46 |
Help! approve PR ^ pretty please! |
@gburiola The current beta for gcloud does not appear to support those arguments anymore.
EDIT: UPDATE: This was due to my outdated SDK version. After updating, the --purpose and prefix-length options now exist! |
I am running the local-exec right after creating the database and a user, and I am getting: |
Error on what? Be more descriptive, and create new issue :) |
I ran into this issue. Essentially the cloud sql instance is still "in progress", being provisioned when this happens. Thus if you try to run subsequent local-exec gcloud commands before it finishes, could run into that error. I had to get around this by doing a little "depends on" trickery:
It's not pretty, but it worked. That allows the database instance to complete before moving on to other actions. Hope that helps. |
This indirect dependency is handled in the beta provider's implementation, see: https://github.com/terraform-providers/terraform-provider-google-beta/blob/2.0.0/website/docs/r/sql_database_instance.html.markdown |
@craigatgoogle that's great news but unfortunately that |
I'll defer to @danawillow as to the best strategy for utilizing the beta provider. |
Yup, private IP support will be in the 2.0.0 release of terraform-provider-google-beta, which has not happened yet. |
Closing this issue since the code has been checked in. |
Is there an ETA on that release? Or is there a way to run use this before the release? |
You can build from HEAD on the Our best ETA is that the |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks! |
Community Note
Description
Google recently announced that CloudSQL private networking moved to Beta: https://cloud.google.com/blog/products/databases/introducing-private-networking-connection-for-cloud-sql
It would be nice if the Google provider for terraform would add support for this feature as well.
New or Affected Resource(s)
The text was updated successfully, but these errors were encountered: