Skip to content

Terraform module for deploying Materialize on GCP with all required infrastructure components.

Notifications You must be signed in to change notification settings

MaterializeInc/terraform-google-materialize

Repository files navigation

Materialize on Google Cloud Platform

Terraform module for deploying Materialize on Google Cloud Platform (GCP) with all required infrastructure components.

This module sets up:

  • GKE cluster for Materialize workloads
  • Cloud SQL PostgreSQL instance for metadata storage
  • Cloud Storage bucket for persistence
  • Required networking and security configurations
  • Service accounts with proper IAM permissions

Warning This is provided on a best-effort basis and Materialize cannot offer support for this module.

The module has been tested with:

  • GKE version 1.28
  • PostgreSQL 15
  • Materialize Operator v0.1.0

Requirements

Name Version
terraform >= 1.0
google >= 6.0
helm ~> 2.0
kubernetes ~> 2.0

Providers

Name Version
google 6.16.0

Modules

Name Source Version
database ./modules/database n/a
gke ./modules/gke n/a
operator github.com/MaterializeInc/terraform-helm-materialize v0.1.0
storage ./modules/storage n/a

Resources

Name Type
google_client_config.current data source
google_client_config.default data source

Inputs

Name Description Type Default Required
database_config Cloud SQL configuration
object({
tier = optional(string, "db-custom-2-4096")
version = optional(string, "POSTGRES_15")
password = string
username = optional(string, "materialize")
db_name = optional(string, "materialize")
})
n/a yes
gke_config GKE cluster configuration
object({
node_count = number
machine_type = string
disk_size_gb = number
min_nodes = number
max_nodes = number
node_locations = list(string)
})
{
"disk_size_gb": 50,
"machine_type": "e2-standard-4",
"max_nodes": 2,
"min_nodes": 1,
"node_count": 1,
"node_locations": []
}
no
helm_values Values to pass to the Helm chart any {} no
install_materialize_operator Whether to install the Materialize operator bool false no
labels Labels to apply to all resources map(string) {} no
materialize_instances Configuration for Materialize instances
list(object({
name = string
namespace = optional(string)
database_name = string
environmentd_version = optional(string, "v0.130.1")
cpu_request = optional(string, "1")
memory_request = optional(string, "1Gi")
memory_limit = optional(string, "1Gi")
}))
[] no
namespace Kubernetes namespace for Materialize string "materialize" no
network_config Network configuration for the GKE cluster
object({
subnet_cidr = string
pods_cidr = string
services_cidr = string
})
{
"pods_cidr": "10.48.0.0/14",
"services_cidr": "10.52.0.0/20",
"subnet_cidr": "10.0.0.0/20"
}
no
operator_namespace Namespace for the Materialize operator string "materialize" no
operator_version Version of the Materialize operator to install string "v25.1.0-beta.1" no
orchestratord_version Version of the Materialize orchestrator to install string "v0.130.1" no
prefix Prefix to be used for resource names string "materialize" no
project_id The ID of the project where resources will be created string n/a yes
region The region where resources will be created string "us-central1" no

Outputs

Name Description
connection_strings Formatted connection strings for Materialize
database Cloud SQL instance details
gke_cluster GKE cluster details
operator Materialize operator details
service_accounts Service account details
storage GCS bucket details

About

Terraform module for deploying Materialize on GCP with all required infrastructure components.

Topics

Resources

Stars

Watchers

Forks

Languages