Skip to content

Commit fe1e008

Browse files
Merge pull request #137 from cloudsmith-io/ceng-445-quarantined-is-missing-from-the-tf-event-types
CENG-445: Add new event subscriptions to webhook
2 parents 319f15e + 8b28af2 commit fe1e008

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

cloudsmith/resource_webhook.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ var (
2323
"package.synced",
2424
"package.syncing",
2525
"package.tags_updated",
26+
"package.released",
27+
"package.restored",
28+
"package.quarantined",
2629
}
2730
requestBodyFormatMap = map[int]string{
2831
0: "JSON Object",

docs/resources/webhook.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,19 @@ resource "cloudsmith_webhook" "my_webhook" {
4444

4545
## Argument Reference
4646

47-
* `events` - (Required) List of events for which this webhook will be fired.
47+
* `events` - (Required) List of events for which this webhook will be fired. Supported events include:
48+
+ `*` - Catch-all for all events.
49+
+ `package.created` - Fired when a package is created.
50+
+ `package.deleted` - Fired when a package is deleted.
51+
+ `package.downloaded` - Fired when a package is downloaded.
52+
+ `package.failed` - Fired when a package fails.
53+
+ `package.security_scanned` - Fired when a package security scan is completed.
54+
+ `package.synced` - Fired when a package is synced.
55+
+ `package.syncing` - Fired when a package is syncing.
56+
+ `package.tags_updated` - Fired when package tags are updated.
57+
+ `package.released` - Fired when a package is released.
58+
+ `package.restored` - Fired when a package is restored.
59+
+ `package.quarantined` - Fired when a package is quarantined.
4860
* `is_active` - (Optional) If enabled, the webhook will trigger on subscribed events and send payloads to the configured target URL.
4961
* `namespace` - (Required) Namespace (or organization) to which this webhook belongs.
5062
* `package_query` - (Optional) The package-based search query for webhooks to fire. This uses the same syntax as the standard search used for repositories, and also supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. If a package does not match, the webhook will not fire.

0 commit comments

Comments
 (0)