From fe080977c2df3a4e722182bdb9bacd0fe2bd6fbb Mon Sep 17 00:00:00 2001 From: Modular Magician Date: Wed, 5 Oct 2022 17:51:06 +0000 Subject: [PATCH] dataproc metastore - add BQ support (#6631) Signed-off-by: Modular Magician --- .changelog/6631.txt | 3 + ...ataproc_metastore_federation.html.markdown | 57 +++++++++++++++++-- 2 files changed, 54 insertions(+), 6 deletions(-) create mode 100644 .changelog/6631.txt diff --git a/.changelog/6631.txt b/.changelog/6631.txt new file mode 100644 index 00000000000..b67f62d2a1a --- /dev/null +++ b/.changelog/6631.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +metastore: add bigquery support for `google_dataproc_metastore_service` +``` diff --git a/website/docs/r/dataproc_metastore_federation.html.markdown b/website/docs/r/dataproc_metastore_federation.html.markdown index 65ae504c652..5f13694dbef 100644 --- a/website/docs/r/dataproc_metastore_federation.html.markdown +++ b/website/docs/r/dataproc_metastore_federation.html.markdown @@ -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" { @@ -61,6 +61,51 @@ resource "google_dataproc_metastore_service" "default" { } } ``` + +## 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 @@ -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`. - - -