Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

ClickHouse 6 min read Announcement mediumAdept

New Terraform provider: Manage ClickHouse database users, roles, and privileges with code

ClickHouse's new clickhousedbops Terraform provider, now generally available, manages databases, users, roles and privilege grants on both ClickHouse Cloud and self-hosted instances. A walkthrough provisions a Cloud service with the existing clickhouse provider, then wires clickhousedbops to the service's native-secure endpoint to create a database, three users, table-scoped SELECT roles and role grants in a single apply. For self-hosted clusters with multiple replicas, set cluster_name so resources are created on every replica. It must stay null on ClickHouse Cloud and should be omitted when user_directory uses replicated storage.

Related posts

  • Using ClickHouse Cloud and Terraform for CI/CD

    ClickHouse mediumAdept

    ClickHouse's new Terraform provider, built on the ClickHouse Cloud API, can provision ephemeral ClickHouse Cloud services for CI. The ClickHouse Go client's GitHub Actions tests were moved off a shared, always-on production service, which had been a single point of failure, caused table explosion and concurrent-DDL ZooKeeper load, and made logs hard to debug. Each test run now creates its own development-tier service with Terraform, runs the suite and destroys the service, usually in under 10 minutes. The walkthrough covers API token setup, provider configuration with secret tfvars, the HCL service resource with host and service-id outputs, and the changes to the workflow.

  • Getting started with clickhousectl: the ClickHouse CLI for local and cloud

    ClickHouse mediumAdept

    clickhousectl (alias chctl) is a single CLI that manages local ClickHouse versions, isolated named servers, project scaffolding and ClickHouse Cloud services. Shared version binaries, per-directory named servers with auto-assigned ports, and a standard clickhouse/ layout for tables, materialized views, queries and seed data make side-by-side upgrade testing straightforward. Cloud auth is deliberately split: browser OAuth grants read-only access, while service creation, scaling and schema changes require an API key, a guard aimed at agent-driven use. The tool also installs Claude Code skills for local dev and cloud deploy, and fits into CI via a static binary, env-var auth and JSON output, with a sample GitHub Actions schema-validation workflow.

  • Terraform & OpenAPI for ClickPipes is now Generally Available

    ClickHouse mediumAdept

    ClickPipes, ClickHouse Cloud's managed ingestion service, is now generally available in the ClickHouse Terraform provider (v3.14.0+) and via stable OpenAPI endpoints. Coverage now includes CDC pipes for Postgres, MySQL and MongoDB, BigQuery and Azure Blob connectors, S3/GCS unordered mode and reverse private endpoints, with SSH tunneling still missing. A walkthrough shows how to configure a Postgres CDC pipe in HCL and import existing pipes using import blocks and -generate-config-out. A known limitation is that importing Postgres CDC pipes requires applying with stopped = true first so credentials are written to state.

  • Announcing support for ClickStack in the ClickHouse Terraform provider

    ClickHouse mediumAdept

    The ClickHouse/clickhouse Terraform provider now manages ClickStack dashboards, alerts, sources, saved searches, connections and webhooks for both self-hosted and Managed ClickStack, in beta from v3.25. The support was added as a separate service module inside the existing provider rather than as a new provider, so Cloud deployments reuse the same API credentials and self-hosted ones use an endpoint plus a personal API key. Supporting it meant tightening the ClickStack OpenAPI contract with named types, consistent integer fields and structured validation errors. Dashboard JSON is also validated against the ClickStack API during terraform plan, falling back to a warning on older versions. A walkthrough covers creating a dashboard with jsonencode, importing existing resources including generated import blocks and bulk export, and a caveat that UI edits are not detected as drift and can be overwritten.

  • Building ClickHouse BYOC (Bring Your Own Cloud) on AWS

    ClickHouse mediumAdept

    ClickHouse BYOC on AWS splits a ClickHouse-hosted management plane from a data plane EKS cluster in the customer's VPC, provisioned automatically with CloudFormation and Crossplane. Support access is approved, audited, time-bound and routed through Tailscale. Engineers authenticate with temporary certificates tied to a ClickHouse user profile that can read only system tables such as query_log, never customer data. Custom Profiles with node-group labels and node selectors replaced the default scheduler plus cluster autoscaler, which had wasted resources because of DaemonSet overhead and poor scale-in behaviour on m7gd node pools. Customers choose maintenance windows for upgrades, and ClickHouse handles EKS version maintenance.

The quest for software engineering knowledge.

Look:
Layout: