ignitify_hook
An inbound hook of a task. A POST to its URL, signed with its secret, starts a run of the newest ready deployment of the task. Needs hooks.read and hooks.write (tasks.read to import), and a plan with webhooks.
Example
# The hook belongs to the task: a code update keeps its URL and secret.
resource "ignitify_hook" "report" {
task = ignitify_task.report.slug
}
output "hook_url" {
value = ignitify_hook.report.url
}
output "hook_secret" {
value = ignitify_hook.report.secret
sensitive = true
}Arguments and attributes
| Name | Type | Use | Meaning |
|---|---|---|---|
task | String | Requiredforces replacement | The slug of the task. |
url | String | Read-only | The URL that triggers the hook. |
secret | String | Read-onlysensitive | The key that signs a trigger. The server shows it once, at create. Empty after an import. |
created_at | String | Read-only | When the hook was created (ISO 8601). |
resource_id | String | Read-only | The server id of the hook. The import id is <task slug>/<resource_id>. |
Behaviour
- The hook belongs to the task. A code update keeps its URL and secret.
- To rotate the URL and the secret, replace the hook:
terraform apply -replace=ignitify_hook.report. The old URL stops working. - A sender signs each call with the secret. See Trigger from a webhook.
Import
The import id is <task slug>/<resource_id>. After an import, secret is empty.
$ terraform import ignitify_hook.report report/<resource_id>