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
| Attribute | Type | Description |
|---|---|---|
id | String | Always "config". |
raw | String | The full JSON config string. |
hash | String | Opaque hash of the config. Changes when the config changes. |