Skip to main content
Clisma uses an HCL config file to define environments and migration settings. The root blocks are:
  • env "name" for a database environment
  • variable "name" for user-defined inputs

Minimum config

env “name”

Fields:
  • url (string) Connection string. Supports env("NAME").
  • exclude (list<string>, optional) Patterns to ignore.
  • migrations (block) Migration settings.
  • tls (block, optional) TLS certificate settings for custom CA and mTLS:
    • ca_file (string, required if tls is set) Path to CA certificate in PEM format.
    • cert_file (string, optional) Client certificate in PEM format.
    • key_file (string, optional) Client key in PEM format. Must be provided together with cert_file.

migrations

  • dir (string) Path to migrations directory.
  • table (block, optional) Tracking table settings.
    • table.name (string, optional) Custom tracking table.
    • table.is_replicated (bool, optional, default false) Use replicated tracking table with ON CLUSTER.
    • table.cluster_name (string, optional) Cluster name override for ON CLUSTER. Useful when multiple clusters exist.
    • table.replication_path (string, optional) Replication path for the tracking table. If set, replicated mode is enabled even when table.is_replicated is omitted.
  • vars (object, optional) Variables for Handlebars templates.

variable “name”