Support CMEK encryption on Bigtable instances. (#1956)

This commit is contained in:
Jason Steenblik 2024-01-05 09:29:36 +01:00 committed by GitHub
parent 29b615e20d
commit 22e9e9e950
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 5 deletions

View File

@ -230,15 +230,16 @@ module "bigtable-instance" {
| name | description | type | required | default |
|---|---|:---:|:---:|:---:|
| [clusters](variables.tf#L17) | Clusters to be created in the BigTable instance. Set more than one cluster to enable replication. If you set autoscaling, num_nodes will be ignored. | <code title="map&#40;object&#40;&#123;&#10; zone &#61; optional&#40;string&#41;&#10; storage_type &#61; optional&#40;string&#41;&#10; num_nodes &#61; optional&#40;number&#41;&#10; autoscaling &#61; optional&#40;object&#40;&#123;&#10; min_nodes &#61; number&#10; max_nodes &#61; number&#10; cpu_target &#61; number&#10; storage_target &#61; optional&#40;number&#41;&#10; &#125;&#41;&#41;&#10;&#125;&#41;&#41;">map&#40;object&#40;&#123;&#8230;&#125;&#41;&#41;</code> | ✓ | |
| [name](variables.tf#L81) | The name of the Cloud Bigtable instance. | <code>string</code> | ✓ | |
| [project_id](variables.tf#L86) | Id of the project where datasets will be created. | <code>string</code> | ✓ | |
| [name](variables.tf#L87) | The name of the Cloud Bigtable instance. | <code>string</code> | ✓ | |
| [project_id](variables.tf#L92) | Id of the project where datasets will be created. | <code>string</code> | ✓ | |
| [default_autoscaling](variables.tf#L33) | Default settings for autoscaling of clusters. This will be the default autoscaling for any cluster not specifying any autoscaling details. | <code title="object&#40;&#123;&#10; min_nodes &#61; number&#10; max_nodes &#61; number&#10; cpu_target &#61; number&#10; storage_target &#61; optional&#40;number&#41;&#10;&#125;&#41;">object&#40;&#123;&#8230;&#125;&#41;</code> | | <code>null</code> |
| [default_gc_policy](variables.tf#L44) | Default garbage collection policy, to be applied to all column families and all tables. Can be override in the tables variable for specific column families. | <code title="object&#40;&#123;&#10; deletion_policy &#61; optional&#40;string&#41;&#10; gc_rules &#61; optional&#40;string&#41;&#10; mode &#61; optional&#40;string&#41;&#10; max_age &#61; optional&#40;string&#41;&#10; max_version &#61; optional&#40;string&#41;&#10;&#125;&#41;">object&#40;&#123;&#8230;&#125;&#41;</code> | | <code>null</code> |
| [deletion_protection](variables.tf#L56) | Whether or not to allow Terraform to destroy the instance. Unless this field is set to false in Terraform state, a terraform destroy or terraform apply that would delete the instance will fail. | <code>bool</code> | | <code>true</code> |
| [display_name](variables.tf#L63) | The human-readable display name of the Bigtable instance. | <code>string</code> | | <code>null</code> |
| [iam](variables.tf#L69) | IAM bindings for topic in {ROLE => [MEMBERS]} format. | <code>map&#40;list&#40;string&#41;&#41;</code> | | <code>&#123;&#125;</code> |
| [labels](variables.tf#L75) | Labels to be attached to the instance. | <code>map&#40;string&#41;</code> | | <code>&#123;&#125;</code> |
| [tables](variables.tf#L91) | Tables to be created in the BigTable instance. | <code title="map&#40;object&#40;&#123;&#10; split_keys &#61; optional&#40;list&#40;string&#41;, &#91;&#93;&#41;&#10; column_families &#61; optional&#40;map&#40;object&#40;&#10; &#123;&#10; gc_policy &#61; optional&#40;object&#40;&#123;&#10; deletion_policy &#61; optional&#40;string&#41;&#10; gc_rules &#61; optional&#40;string&#41;&#10; mode &#61; optional&#40;string&#41;&#10; max_age &#61; optional&#40;string&#41;&#10; max_version &#61; optional&#40;string&#41;&#10; &#125;&#41;, null&#41;&#10; &#125;&#41;&#41;, &#123;&#125;&#41;&#10;&#125;&#41;&#41;">map&#40;object&#40;&#123;&#8230;&#125;&#41;&#41;</code> | | <code>&#123;&#125;</code> |
| [encryption_key](variables.tf#L69) | The KMS key id to used for encryption of the Bigtable instance. | <code>string</code> | | <code>null</code> |
| [iam](variables.tf#L75) | IAM bindings for topic in {ROLE => [MEMBERS]} format. | <code>map&#40;list&#40;string&#41;&#41;</code> | | <code>&#123;&#125;</code> |
| [labels](variables.tf#L81) | Labels to be attached to the instance. | <code>map&#40;string&#41;</code> | | <code>&#123;&#125;</code> |
| [tables](variables.tf#L97) | Tables to be created in the BigTable instance. | <code title="map&#40;object&#40;&#123;&#10; split_keys &#61; optional&#40;list&#40;string&#41;, &#91;&#93;&#41;&#10; column_families &#61; optional&#40;map&#40;object&#40;&#10; &#123;&#10; gc_policy &#61; optional&#40;object&#40;&#123;&#10; deletion_policy &#61; optional&#40;string&#41;&#10; gc_rules &#61; optional&#40;string&#41;&#10; mode &#61; optional&#40;string&#41;&#10; max_age &#61; optional&#40;string&#41;&#10; max_version &#61; optional&#40;string&#41;&#10; &#125;&#41;, null&#41;&#10; &#125;&#41;&#41;, &#123;&#125;&#41;&#10;&#125;&#41;&#41;">map&#40;object&#40;&#123;&#8230;&#125;&#41;&#41;</code> | | <code>&#123;&#125;</code> |
## Outputs

View File

@ -49,6 +49,7 @@ resource "google_bigtable_instance" "default" {
zone = cluster.value.zone
storage_type = cluster.value.storage_type
num_nodes = cluster.value.num_nodes
kms_key_name = var.encryption_key
dynamic "autoscaling_config" {
for_each = cluster.value.autoscaling == null ? [] : [""]

View File

@ -66,6 +66,12 @@ variable "display_name" {
default = null
}
variable "encryption_key" {
description = "The KMS key id to used for encryption of the Bigtable instance."
type = string
default = null
}
variable "iam" {
description = "IAM bindings for topic in {ROLE => [MEMBERS]} format."
type = map(list(string))