Skip to content

Webhooks

The appwrite_webhook resource registers a URL and event subscriptions so Appwrite can notify your services when resources change. Configure tls for TLS verification on the webhook URL, auth_username and auth_password when your endpoint expects HTTP basic authentication, and read secret from Terraform state when you verify incoming webhook signatures on your server.

See the Terraform Registry: webhook. The provider repository lists the full argument reference.

Resource

ResourcePurpose
appwrite_webhook
Register a webhook URL and subscribe to Appwrite events

Examples

Basic

resource "appwrite_webhook" "user_events" {
  name   = "user-events"
  url    = "https://api.example.com/webhooks/users"
  events = ["users.*.create", "users.*.update"]
  tls    = true
}

TLS and HTTP basic auth to your endpoint

resource "appwrite_webhook" "authenticated" {
  name          = "authenticated webhook"
  url           = "https://api.example.com/webhooks/secure"
  events        = ["databases.*.collections.*.documents.*.create"]
  auth_username = "webhook"
  auth_password = var.webhook_password
  tls           = true
}

Use the read-only secret attribute when configuring signature verification for payloads Appwrite sends to your URL (see Webhooks in the platform docs).

Data sources

The appwrite_webhook data source reads a webhook that already exists by ID. Use it to reference an existing webhook from other resources or outputs without recreating it in Terraform.

data "appwrite_webhook" "slack" {
  id = "64f2cd7e27bda9f23ab6"
}

output "webhook_url" {
  value = data.appwrite_webhook.slack.url
}

See the Terraform Registry for the full attribute list.