Provider & Resources
Reference for the provider block and every resource the Webhookr provider manages.
Provider block
terraform {
required_providers {
webhookr = {
source = "forgers-tech/webhookr"
}
}
}
provider "webhookr" {
api_url = "https://api.webhookr.tech"
}
| Argument | Required | Description |
|---|---|---|
api_url | Yes | Webhookr API base URL. Env: WEBHOOKR_API_URL. |
api_token | Conditional | API token (whk_…). Env: WEBHOOKR_API_TOKEN. Mutually exclusive with Firebase. |
firebase_api_key | Conditional | Firebase Web API key. Env: WEBHOOKR_FIREBASE_API_KEY. |
service_account_email | Conditional | Service account email. Env: WEBHOOKR_SERVICE_ACCOUNT_EMAIL. |
service_account_key | Conditional | Service account RSA private key (PEM). Env: WEBHOOKR_SERVICE_ACCOUNT_KEY. |
See Authentication for how the two auth modes interact.
webhookr_project
Manages a Webhookr project.
resource "webhookr_project" "payments" {
name = "payments-prod"
}
Arguments
| Argument | Required | Description |
|---|---|---|
name | Yes | Display name (max 100 characters). |
Attributes
| Attribute | Description |
|---|---|
id | Unique identifier of the project. |
created_at | RFC3339 creation timestamp. |
updated_at | RFC3339 timestamp of the last update. |
webhookr_endpoint
Manages an endpoint within a project.
resource "webhookr_endpoint" "stripe" {
project_id = webhookr_project.payments.id
name = "Stripe events"
is_active = true
}
Arguments
| Argument | Required | Default | Description |
|---|---|---|---|
project_id | Yes | — | ID of the parent project. |
name | Yes | — | Display name (max 100 characters). |
is_active | No | true | Whether the endpoint accepts incoming events. |
Attributes
| Attribute | Description |
|---|---|
id | Unique identifier of the endpoint. |
slug | URL-safe slug generated by the API. Used in the ingest URL: /v1/ingest/<slug>. |
created_at | RFC3339 creation timestamp. |
updated_at | RFC3339 timestamp of the last update. |
note
slug is computed — the API generates it. You can't set it from Terraform.
webhookr_destination
Manages a delivery target on an endpoint.
resource "webhookr_destination" "orders" {
project_id = webhookr_project.payments.id
endpoint_id = webhookr_endpoint.stripe.id
name = "Order service"
url = "https://orders.internal.example.com/webhooks/stripe"
method = "POST"
content_type = "application/json"
timeout_ms = 30000
is_enabled = true
headers = {
"X-Internal-Token" = "rotate-me"
}
}
Arguments
| Argument | Required | Default | Description |
|---|---|---|---|
project_id | Yes | — | ID of the parent project. |
endpoint_id | Yes | — | ID of the parent endpoint. |
name | Yes | — | Display name (max 100 characters). |
url | Yes | — | HTTPS URL that receives event deliveries. |
method | No | POST | One of GET, POST, PUT, PATCH, DELETE. |
headers | No | — | Map of custom headers (max 20 entries). |
content_type | No | application/json | Content-Type header for deliveries. |
timeout_ms | No | 30000 | Request timeout in ms (1000–60000). |
is_enabled | No | true | Whether the destination receives deliveries. |
Attributes
| Attribute | Description |
|---|---|
id | Unique identifier of the destination. |
created_at | RFC3339 creation timestamp. |
updated_at | RFC3339 timestamp of the last update. |
See the complete example to put these together.