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

dataproc metastore - add BQ support #12724

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/6631.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
metastore: add bigquery support for `google_dataproc_metastore_service`
```
57 changes: 51 additions & 6 deletions website/docs/r/dataproc_metastore_federation.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ resource "google_dataproc_metastore_federation" "default" {
version = "3.1.2"

backend_metastores {
rank = "1"
name = google_dataproc_metastore_service.default.id
metastore_type = "DATAPROC_METASTORE"
}
rank = "1"
name = google_dataproc_metastore_service.default.id
metastore_type = "DATAPROC_METASTORE"
}
}

resource "google_dataproc_metastore_service" "default" {
Expand All @@ -61,6 +61,51 @@ resource "google_dataproc_metastore_service" "default" {
}
}
```
<div class = "oics-button" style="float: right; margin: 0 0 -15px">
<a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_working_dir=dataproc_metastore_federation_bigquery&cloudshell_image=gcr.io%2Fgraphite-cloud-shell-images%2Fterraform%3Alatest&open_in_editor=main.tf&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md" target="_blank">
<img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;">
</a>
</div>
## Example Usage - Dataproc Metastore Federation Bigquery


```hcl
resource "google_dataproc_metastore_federation" "default" {
provider = google-beta
location = "us-central1"
federation_id = "fed-2"
version = "3.1.2"

backend_metastores {
rank = "2"
name = data.google_project.project.id
metastore_type = "BIGQUERY"
}

backend_metastores {
rank = "1"
name = google_dataproc_metastore_service.default.id
metastore_type = "DATAPROC_METASTORE"
}
}

resource "google_dataproc_metastore_service" "default" {
provider = google-beta
service_id = "fed-2"
location = "us-central1"
tier = "DEVELOPER"


hive_metastore_config {
version = "3.1.2"
endpoint_protocol = "GRPC"
}
}

data "google_project" "project" {
provider = google-beta
}
```

## Argument Reference

Expand Down Expand Up @@ -89,12 +134,12 @@ The following arguments are supported:

* `name` -
(Required)
The relative resource name of the metastore that is being federated.
The relative resource name of the metastore that is being federated. The formats of the relative resource names for the currently supported metastores are listed below: Dataplex: projects/{projectId}/locations/{location}/lakes/{lake_id} BigQuery: projects/{projectId} Dataproc Metastore: projects/{projectId}/locations/{location}/services/{serviceId}

* `metastore_type` -
(Required)
The type of the backend metastore.
Possible values are `METASTORE_TYPE_UNSPECIFIED` and `DATAPROC_METASTORE`.
Possible values are `METASTORE_TYPE_UNSPECIFIED`, `DATAPROC_METASTORE`, and `BIGQUERY`.

- - -

Expand Down