Skip to content

Commit

Permalink
Merge pull request #2025 from dglsparsons/master
Browse files Browse the repository at this point in the history
Support worker_trace_events dataset in logspush jobs
  • Loading branch information
jacobbednarz committed Nov 16, 2022
2 parents f32ca3e + 58d771f commit 01336b9
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .changelog/2025.txt
@@ -0,0 +1,3 @@
```release-note:enhancement
resource/cloudflare_logpush_job: add support for `workers_trace_events`
```
2 changes: 1 addition & 1 deletion docs/resources/logpush_job.md
Expand Up @@ -110,7 +110,7 @@ resource "cloudflare_logpush_job" "example_job" {

### Required

- `dataset` (String) Uniquely identifies a resource (such as an s3 bucket) where data will be pushed. Additional configuration parameters supported by the destination may be included. See [Logpush destination documentation](https://developers.cloudflare.com/logs/reference/logpush-api-configuration#destination). Available values: `access_requests`, `firewall_events`, `http_requests`, `spectrum_events`, `nel_reports`, `audit_logs`, `gateway_dns`, `gateway_http`, `gateway_network`, `dns_logs`, `network_analytics_logs`.
- `dataset` (String) Uniquely identifies a resource (such as an s3 bucket) where data will be pushed. Additional configuration parameters supported by the destination may be included. See [Logpush destination documentation](https://developers.cloudflare.com/logs/reference/logpush-api-configuration#destination). Available values: `access_requests`, `firewall_events`, `http_requests`, `spectrum_events`, `nel_reports`, `audit_logs`, `gateway_dns`, `gateway_http`, `gateway_network`, `dns_logs`, `network_analytics_logs`, `workers_trace_events`.
- `destination_conf` (String) Uniquely identifies a resource (such as an s3 bucket) where data will be pushed. Additional configuration parameters supported by the destination may be included. See [Logpush destination documentation](https://developers.cloudflare.com/logs/reference/logpush-api-configuration#destination).

### Optional
Expand Down
37 changes: 33 additions & 4 deletions internal/provider/schema_cloudflare_logpush_job.go
Expand Up @@ -40,10 +40,39 @@ func resourceCloudflareLogpushJobSchema() map[string]*schema.Schema {
Description: "The name of the logpush job to create.",
},
"dataset": {
Type: schema.TypeString,
Required: true,
ValidateFunc: validation.StringInSlice([]string{"access_requests", "firewall_events", "http_requests", "spectrum_events", "nel_reports", "audit_logs", "gateway_dns", "gateway_http", "gateway_network", "dns_logs", "network_analytics_logs"}, false),
Description: fmt.Sprintf("Uniquely identifies a resource (such as an s3 bucket) where data will be pushed. Additional configuration parameters supported by the destination may be included. See [Logpush destination documentation](https://developers.cloudflare.com/logs/reference/logpush-api-configuration#destination). %s", renderAvailableDocumentationValuesStringSlice([]string{"access_requests", "firewall_events", "http_requests", "spectrum_events", "nel_reports", "audit_logs", "gateway_dns", "gateway_http", "gateway_network", "dns_logs", "network_analytics_logs"})),
Type: schema.TypeString,
Required: true,
ValidateFunc: validation.StringInSlice([]string{
"access_requests",
"firewall_events",
"http_requests",
"spectrum_events",
"nel_reports",
"audit_logs",
"gateway_dns",
"gateway_http",
"gateway_network",
"dns_logs",
"network_analytics_logs",
"workers_trace_events",
}, false),
Description: fmt.Sprintf(
"Uniquely identifies a resource (such as an s3 bucket) where data will be pushed. Additional configuration parameters supported by the destination may be included. See [Logpush destination documentation](https://developers.cloudflare.com/logs/reference/logpush-api-configuration#destination). %s",
renderAvailableDocumentationValuesStringSlice([]string{
"access_requests",
"firewall_events",
"http_requests",
"spectrum_events",
"nel_reports",
"audit_logs",
"gateway_dns",
"gateway_http",
"gateway_network",
"dns_logs",
"network_analytics_logs",
"workers_trace_events",
}),
),
},
"logpull_options": {
Type: schema.TypeString,
Expand Down

0 comments on commit 01336b9

Please sign in to comment.