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

Add support for Dataproc Metastore CMEK config #11468

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/5881.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
metastore: Added support for encryption_config during service creation.
```
45 changes: 45 additions & 0 deletions website/docs/r/dataproc_metastore_service.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,38 @@ resource "google_dataproc_metastore_service" "default" {
}
}
```
## Example Usage - Dataproc Metastore Service Cmek Example


```hcl
resource "google_dataproc_metastore_service" "default" {
provider = google-beta
service_id = "example-service"
location = "us-central1"

encryption_config {
kms_key = google_kms_crypto_key.crypto_key.id
}

hive_metastore_config {
version = "3.1.2"
}
}

resource "google_kms_crypto_key" "crypto_key" {
provider = google-beta
name = "example-key"
key_ring = google_kms_key_ring.key_ring.id

purpose = "ENCRYPT_DECRYPT"
}

resource "google_kms_key_ring" "key_ring" {
provider = google-beta
name = "example-keyring"
location = "us-central1"
}
```

## Argument Reference

Expand Down Expand Up @@ -94,6 +126,12 @@ The following arguments are supported:
This specifies when the service can be restarted for maintenance purposes in UTC time.
Structure is [documented below](#nested_maintenance_window).

* `encryption_config` -
(Optional)
Information used to configure the Dataproc Metastore service to encrypt
customer data at rest.
Structure is [documented below](#nested_encryption_config).

* `hive_metastore_config` -
(Optional)
Configuration information specific to running Hive metastore software as the metastore service.
Expand All @@ -119,6 +157,13 @@ The following arguments are supported:
The day of week, when the window starts.
Possible values are `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`, and `SUNDAY`.

<a name="nested_encryption_config"></a>The `encryption_config` block supports:

* `kms_key` -
(Required)
The fully qualified customer provided Cloud KMS key name to use for customer data encryption.
Use the following format: `projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+)`

<a name="nested_hive_metastore_config"></a>The `hive_metastore_config` block supports:

* `version` -
Expand Down