You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/gcp-project-byoc-I/README.md
+24Lines changed: 24 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,6 +47,30 @@ The example grants the storage service account to the fixed BYOC-I Kubernetes se
47
47
48
48
The booter VM always uses a dedicated booter service account. The Zilliz BYOC organization service account is not granted permission to impersonate the maintenance service account. The in-cluster `infra/infra-agent-sa` Kubernetes service account uses GKE Workload Identity to access the maintenance service account instead.
49
49
50
+
### GCS Bucket CMEK
51
+
52
+
The GCS bucket uses Google-managed encryption by default. To use a customer-managed Cloud KMS key for new bucket objects, enable CMEK:
53
+
54
+
```hcl
55
+
enable_gcs_kms = true
56
+
```
57
+
58
+
When `gcs_kms_key_name` is empty, Terraform creates a Cloud KMS key ring and crypto key in the BYOC-I region and uses that key for the bucket. The generated KMS resource names are derived from the bucket name.
59
+
60
+
To use an existing Cloud KMS key instead, pass the full key resource name:
Terraform-created KMS keys are automatically granted to the bucket project's Cloud Storage service agent. When using an existing key, `grant_gcs_kms_key_iam = true` default grants the same `roles/cloudkms.cryptoKeyEncrypterDecrypter` permission on that key. The Terraform runner must be allowed to manage IAM on the KMS key. If the permission is already granted outside Terraform for an existing key, set:
67
+
68
+
```hcl
69
+
grant_gcs_kms_key_iam = false
70
+
```
71
+
72
+
The KMS key location must be compatible with the bucket location. Changing the bucket default KMS key affects new objects written after the change; existing objects are not automatically re-encrypted.
73
+
50
74
The booter image is not required in `terraform.tfvars`. Production defaults to `gcr.io/zilliz-byoc-prod/gcp-byoc-i-booter:latest`; UAT defaults to `gcr.io/zilliz-byoc-uat/gcp-byoc-i-booter:latest`. For development testing only, override `booter_image` locally.
51
75
52
76
For booter troubleshooting, set `booter_print_serial_logs_on_apply = true` to print the booter VM serial console logs during `terraform apply`. This requires `gcloud` to be installed and authenticated on the Terraform runner.
# Enable GCS bucket default encryption with a customer-managed Cloud KMS key. When gcs_kms_key_name is empty, Terraform creates a key ring and crypto key.
30
+
# enable_gcs_kms = true
31
+
# Optional existing key. Leave empty to let Terraform create one.
description="Enable Cloud KMS customer-managed encryption key for the GCS bucket."
240
+
type=bool
241
+
default=false
242
+
}
243
+
244
+
variable"gcs_kms_key_name" {
245
+
description="Existing Cloud KMS key resource name used as the default GCS bucket encryption key. Leave empty to let Terraform create one when enable_gcs_kms is true."
246
+
type=string
247
+
default=""
248
+
}
249
+
250
+
variable"grant_gcs_kms_key_iam" {
251
+
description="Whether Terraform should grant the Cloud Storage service agent roles/cloudkms.cryptoKeyEncrypterDecrypter on an existing gcs_kms_key_name. Terraform-created keys are always granted."
252
+
type=bool
253
+
default=true
254
+
}
255
+
238
256
variable"labels" {
239
257
description="Labels applied to supported GCP resources."
Copy file name to clipboardExpand all lines: modules/gcp_byoc_i/gcs/variables.tf
+24Lines changed: 24 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,12 @@ variable "gcp_region" {
8
8
type=string
9
9
}
10
10
11
+
variable"gcp_project_id" {
12
+
description="Customer GCP project ID."
13
+
type=string
14
+
default=""
15
+
}
16
+
11
17
variable"force_destroy" {
12
18
description="Whether to force destroy non-empty buckets."
13
19
type=bool
@@ -19,3 +25,21 @@ variable "labels" {
19
25
type=map(string)
20
26
default={}
21
27
}
28
+
29
+
variable"enable_gcs_kms" {
30
+
description="Enable Cloud KMS customer-managed encryption key for the GCS bucket."
31
+
type=bool
32
+
default=false
33
+
}
34
+
35
+
variable"gcs_kms_key_name" {
36
+
description="Existing Cloud KMS key resource name used as the default GCS bucket encryption key. Leave empty to let Terraform create one when enable_gcs_kms is true."
37
+
type=string
38
+
default=""
39
+
}
40
+
41
+
variable"grant_gcs_kms_key_iam" {
42
+
description="Whether Terraform should grant the Cloud Storage service agent roles/cloudkms.cryptoKeyEncrypterDecrypter on an existing gcs_kms_key_name. Terraform-created keys are always granted."
0 commit comments