🦞
Data Sources

openclaw_config

Reads the full OpenClaw configuration.

Reads the full current OpenClaw configuration as a raw JSON string with an opaque hash for change detection. Works in both WebSocket and file modes.

Example Usage

data "openclaw_config" "current" {}

output "config_hash" {
  value = data.openclaw_config.current.hash
}

output "raw_config" {
  value = data.openclaw_config.current.raw
}

Use with jsondecode for conditional logic

data "openclaw_config" "current" {}

locals {
  config = jsondecode(data.openclaw_config.current.raw)
  has_whatsapp = try(local.config.channels.whatsapp, null) != null
}

Attribute Reference

AttributeTypeDescription
idStringAlways "config".
rawStringThe full JSON config string.
hashStringOpaque hash of the config. Changes when the config changes.

On this page