Cluster Size Configuration

The cluster_size.tpl file specifies the available parameters for different sizes of LogScale clusters. This template defines various cluster sizes (xsmall, small, medium, large, xlarge) and their associated configurations, including node counts, machine types, disk sizes, and resource limits. The Terraform configuration uses this template to dynamically configure the LogScale deployment based on the selected cluster size.

The data from cluster_size.tpl is retrieved and rendered by the main.tf file. The main configuration uses the jsondecode function to parse the template and select the appropriate cluster size configuration based on the logscale_cluster_size variable.

Example:

# Local Variables
  locals {
    # Render a template of available cluster sizes
    cluster_size_template = jsondecode(templatefile("${path.module}/cluster_size.tpl", {}))
    cluster_size_rendered = {
      for key in keys(local.cluster_size_template) :
      key => local.cluster_size_template[key]
    }
  }

The default environment values set by this Terraform are as follows:

Type Description
GCP_STORAGE_WORKLOAD_IDENTITY true
GCP_STORAGE_BUCKET var.gcs_bucket_name
GCP_STORAGE_ENCRYPTION_KEY Kubernetes Secret: gcp-storage-encryption-key
KAFKA_COMMON_SECURITY_PROTOCOL SSL
USING_EPHEMERAL_DISKS true
KAFKA_BOOTSTRAP_SERVERS var.kafka_broker_servers
KAFKA_SERVERS var.kafka_broker_servers
PUBLIC_URL https://${var.public_url}
AUTHENTICATION_METHOD static
STATIC_USERS Kubernetes Secret: var.k8s_secret_static_user_logins
KAFKA_COMMON_SSL_TRUSTSTORE_TYPE (removed when var.provision_kafka_servers is set to false) PKCS12
KAFKA_COMMON_SSL_TRUSTSTORE_PASSWORD (removed when var.provision_kafka_servers is set to false) Kubernetes Secret: local.kafka_truststore_secret_name
KAFKA_COMMON_SSL_TRUSTSTORE_LOCATION (removed when var.provision_kafka_servers is set to false) /tmp/kafka/ca.p12