Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support worker_trace_events dataset in logspush jobs #2025

Merged
merged 4 commits into from Nov 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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