Terraform variable reference#
Inputs and outputs of the common materialize-monitoring Terraform module.
Most deployments do not set these directly — a per-cloud wrapper in
materialize-terraform-self-managed
forwards the ones that matter and supplies the storage and identity inputs itself.
See Installing via Terraform for the
variables you actually set in a terraform.tfvars.
Inputs#
| Variable | Type | Description | Default / Schema |
|---|---|---|---|
| additional_ | list(string) | Raw YAML documents appended to the Helm values, in order, after everything this module computes.
Later documents win, so anything here overrides the module's opinion. This is the supported way to reach chart settings the module does not model — including scheduling (node selectors, tolerations) and Grafana ingress, neither of which the module surfaces yet. See the README. | [] |
| chart_ | string | OCI registry holding the materialize-monitoring charts. Override for a mirrored or air-gapped registry. | oci://ghcr.io/materializeinc/helm-charts |
| chart_ | string | Version of the materialize-monitoring chart. Leave null, which is the supported path: the module reads the version out of the chart’s own
| &{} |
| crds_ | string | Version of the materialize-monitoring-crds chart. Read from its `Chart.yaml` when null, like `chart_version`. Tracked separately because the CRDs chart has a deliberately looser lifecycle. | &{} |
| create_ | bool | Whether this module creates the namespace. Defaults to false because the Materialize operator module already creates `monitoring` in the supported topology. | false |
| enable_ | bool | Install the materialize-monitoring-crds chart (prometheus-operator and grafana-operator CRDs). Set false when the cluster already has them from elsewhere — kube-prometheus-stack, or a platform team that owns CRDs centrally — since Terraform would otherwise fail trying to create objects it does not own. Note the teardown blast radius: destroying this release deletes the CRDs, which cascades to
every GrafanaDashboard, GrafanaDatasource, PrometheusRule, and PodMonitor in the cluster,
including ones this stack did not create. It is a separate Teardown also needs the Grafana custom resources deleted before grafana-operator goes, or their finalizers have no remover and the CRDs wedge in Terminating. See the “Uninstalling” page in the docs. | true |
| enable_ | bool | Enable the SQL-on-scrape collector against environmentd. Off by default. The chart enables it with an empty password, and no Supply | false |
| google_ | schema | Also export metrics to Google Cloud Monitoring from the Alloy gateway. Null disables it; Thanos
is unaffected either way.
Authentication is ADC only. Bind the gateway ServiceAccount to a Google service account holding
| |
| grafana_ | string | Grafana admin password. Generated when null. Supplied to Grafana as a Secret this module owns, rather than letting the bundled chart mint one — the chart's own generation does not survive upgrades. | &{} |
| grafana_ | string | Grafana admin username. | admin |
| install_ | bool | Install metrics-server as part of this stack. Leave false when the Materialize operator module installs it (the default topology), and set
it true when that module has | false |
| install_ | number | Timeout for each Helm release, in seconds. Well above Helm's 300s default: a first install brings up Loki, Thanos, Grafana, and both Alloy roles together. | 900 |
| materialize_ | string | Namespace the Materialize instance runs in. Used to scope scrape targets. | materialize-environment |
| materialize_ | string | Namespace the Materialize operator runs in. | materialize |
| namespace | string | Namespace to install the monitoring stack into. | monitoring |
| node_ | map(string) | Node selector for the centralized monitoring workloads. Not applied to the Alloy agent: it is a DaemonSet that must reach every node to collect logs and node metrics, so constraining it to a workload pool would silently stop collection everywhere else. | map[] |
| object_ | schema | Buckets and workload identity for the logging and metrics backends, supplied by the per-cloud
wrapper module. Leave null to configure storage yourself through `additional_values`.
| |
| sizing | string | Deployment size. The chart's defaults target `medium`, and the small/large profiles are deltas
from it, so `medium` intentionally applies no profile at all. Profiles are read from the chart directory in this repository at the same commit as the pinned chart version, so they cannot drift from it. A profile that does not exist yet is skipped, which is how Thanos sizing will start applying once those profiles land. | medium |
| sql_ | string | Password for the SQL scraper's database user. Required when `enable_sql_scraper` is true. | &{} |
| storage_ | string | StorageClass for the five PVC-backed workloads (Alertmanager, the Loki ruler, and Thanos
receive/compactor/store-gateway). Null uses the cluster default. Loki's ingesters are
unaffected — node-local `emptyDir` by design. Required where the default class cannot serve the nodes: GCP’s C4 and N4 families take only
Hyperdisk, and every Persistent Disk class fails to attach with Changing it on an existing install does not move the volumes. | &{} |
| tolerations | schema | Tolerations for the monitoring workloads, including the Alloy agent DaemonSet — tolerations widen where a pod may run, which is what a DaemonSet wants. | |
Outputs#
| Name | Description |
|---|---|
| chart_version | Chart version this release is pinned to. |
| grafana_admin_password | Grafana admin password. |
| grafana_admin_secret_name | Name of the Secret holding the Grafana admin credentials. |
| grafana_admin_user | Grafana admin username. |
| grafana_url | In-cluster URL for Grafana. Grafana is ClusterIP-only today, so reaching it from outside the cluster needs a port-forward. |
| logs_url | Loki read endpoint (query frontend). Reads carry a tenant header; see the chart’s datasource configuration. |
| metrics_url | Thanos Query endpoint. Prometheus-API-compatible, so consumers of a Prometheus URL keep working against it. |
| namespace | Namespace the monitoring stack is installed into. |
| release_name | Name of the materialize-monitoring Helm release. |
| remote_write_url | Thanos Receive remote-write endpoint, for writers outside this stack. |
| service_account_names | ServiceAccount names the chart renders for storage-bound components. |
| workload_identity_subjects | system:serviceaccount:<namespace>:<sa> subjects for the components that bind to cloud object storage. Use these when building IRSA / Workload Identity trust policies. |