You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The portainer_webhook data source allows you to look up an existing Portainer webhook by its resource ID and endpoint ID. This is useful for retrieving the secret token of a webhook for automation purposes.
Example Usage
Look up a webhook by resource and endpoint
data"portainer_webhook""stack_webhook" {
resource_id="12"# ID of the stack or serviceendpoint_id=1# ID of the environment
}
output"webhook_url" {
value="https://portainer.example.com/api/webhooks/${data.portainer_webhook.stack_webhook.token}"
}