terraform-provider-google
terraform-provider-google copied to clipboard
BigQuery connection resource
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment. If the issue is assigned to the "modular-magician" user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If the issue is assigned to a user, that user is claiming responsibility for the issue. If the issue is assigned to "hashibot", a community member has claimed the issue already.
Description
Support bigquery connections for federation with cloud sql.
New or Affected Resource(s)
- google_bigquery_connection (new resource)
Potential Terraform Configuration
resource "google_bigquery_connection" "my_federation" {
connection_type = "CLOUD_SQL"
instance_id = var.my_cloud_sql_instance_id
...
}
References
- https://cloud.google.com/bigquery/docs/cloud-sql-federated-queries#create_a_connection_resource
Hey @jmcarp, the BigQuery API defines this resource as a "transfer config", so that's what we've named the Terraform resource: https://www.terraform.io/docs/providers/google/r/bigquery_data_transfer_config.html. I'm going to go ahead and close this since as far as I can tell it's already done (🎉 ) but if there's more that I'm missing we can certainly reopen it and take another look.
Thanks @danawillow. It looks like query federation uses the bigqueryconnection API, not the bigquerydatatransfer API. Documentation is at https://cloud.google.com/bigquery/docs/reference/bigqueryconnection/rest/. I don't see a way to set up Cloud SQL federation with the transfer config resource. Am I missing something?
Nope, I think you're right! The GCP docs were misleading in this case. Reopening.
Also perhaps missing is a way to create connection credentials as the Connection object doesn't include a way to set a username and password.
- Rest API: https://cloud.google.com/bigquery/docs/reference/bigqueryconnection/rest/v1beta1/projects.locations.connections/updateCredential
Any updates on this?
rileykarson this can be closed
b/262665528
I've gone through this issue and the request was regarding a new resource bigQueryConnection.
- I've found the Pull Request that was merged, which provided support for the request.
- Then, as per comment which stated that a way to create connection credentials were missing, another Pull Request was raised, which was merged.
Hence, closing this issue.
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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.