/terraform-google-bigtable

Create and manage Google Bigtable resources

Primary LanguageHCLApache License 2.0Apache-2.0

terraform-google-bigtable

This terraform module is used to create big table resources such as big table instance and tables

Assumptions and prerequisites

This module assumes that below mentioned prerequisites are in place before consuming the module.

  • To deploy this blueprint you must have an active billing account and billing permissions.
  • APIs are enabled
  • Permissions are available

Usage

Basic usage of this module is as follows:

module "bigtable" {
  source  = "terraform-google-modules/bigtable/google"
  version = "~> 0.1"

  project_id  = "<PROJECT ID>"
  bucket_name = "gcs-test-bucket"
}

Functional examples are included in the examples directory.

Inputs

Name Description Type Default Required
deletion_protection Whether or not to allow Terraform to destroy the instance bool true no
display_name The human-readable display name of the Bigtable instance. Defaults to the instance name string n/a yes
labels labels associated to the Bigtable instance. map(string) {} no
name The unique name of the Bigtable instance. string n/a yes
project_id The ID of the project in which the resource belongs string n/a yes
storage_type The storage type to use. One of SSD or HDD. Defaults to SSD string "SSD" no
tables Tables to created in the Bigtable instance.
map(object({
table_name = string
split_keys = optional(list(string))
deletion_protection = optional(string)
change_stream_retention = optional(number)
column_family = optional(map(object({
family = string
}))
)
}))
{} no
zones Zones of the Bigtable cluster.
map(object({
zone = string
cluster_id = string
num_nodes = optional(number)
kms_key_name = optional(string)
autoscaling_config = optional(object({
min_nodes = number
max_nodes = number
cpu_target = number
storage_target = optional(number)
}))
}))
n/a yes

Outputs

Name Description
instance_id Bigtable instance id
instance_name Bigtable instance name
table_ids List of table being provisioned

Requirements

These sections describe requirements for using this module.

Software

The following dependencies must be available:

Service Account

A service account with the following roles must be used to provision the resources of this module:

  • Storage Admin: roles/storage.admin

The Project Factory module and the IAM module may be used in combination to provision a service account with the necessary roles applied.

APIs

A project with the following APIs enabled must be used to host the resources of this module:

  • Google Cloud Storage JSON API: storage-api.googleapis.com

The Project Factory module can be used to provision a project with the necessary APIs enabled.

Contributing

Refer to the contribution guidelines for information on contributing to this module.

Security Disclosures

Please see our security disclosure process.