Appendix: Required configuration

Required variables

The following variables are required when using the Materialize on Google Cloud Provider Terraform module.

Variable
project_id = <string>
prefix = <string>
database_config = {
  password = <string>  # required
  # tier     = <string>  # optional
  # version  = <string>  # optional
  # username = <string>  # optional
  # db_name  = <string>  # optional
}
network_config = {     # required starting in v0.2.0
  subnet_cidr   = <string>
  pods_cidr     = <string>
  services_cidr = <string>
}

For a list of all variables, see the README.md or the variables.tf file.

Required providers and data source declaration

To use Materialize on Google Cloud Terraform module v0.2.0+, you need to declare:

  • The following providers:

    provider "google" {
      project = var.project_id
      region  = var.region
      # Specify additional Google provider configuration as needed
    }
    
    # Required for GKE authentication
    provider "kubernetes" {
      host                   = "https://${module.gke.cluster_endpoint}"
      token                  = data.google_client_config.current.access_token
      cluster_ca_certificate = base64decode(module.gke.cluster_ca_certificate)
    }
    
    provider "helm" {
      kubernetes {
        host                   = "https://${module.gke.cluster_endpoint}"
        token                  = data.google_client_config.current.access_token
        cluster_ca_certificate = base64decode(module.gke.cluster_ca_certificate)
      }
    }
    
  • The following data source:

    data "google_client_config" "current" {}
    
Back to top ↑