terraform-provider-google icon indicating copy to clipboard operation
terraform-provider-google copied to clipboard

BigQuery connection resource

Open jmcarp opened this issue 5 years ago • 6 comments

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

jmcarp avatar Jan 29 '20 17:01 jmcarp

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.

danawillow avatar Feb 03 '20 17:02 danawillow

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?

jmcarp avatar Feb 03 '20 17:02 jmcarp

Nope, I think you're right! The GCP docs were misleading in this case. Reopening.

danawillow avatar Feb 03 '20 18:02 danawillow

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

michellen-hf avatar May 04 '20 23:05 michellen-hf

Any updates on this?

red8888 avatar May 19 '21 19:05 red8888

rileykarson this can be closed

DrFaust92 avatar Sep 18 '22 20:09 DrFaust92

b/262665528

sanghaniJ avatar Dec 15 '22 06:12 sanghaniJ

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.

sanghaniJ avatar Dec 15 '22 06:12 sanghaniJ

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.

github-actions[bot] avatar Jan 15 '23 02:01 github-actions[bot]