From 5a35a6cda379cae318a98712b8a42271c12012dd Mon Sep 17 00:00:00 2001 From: Douglas Parsons Date: Tue, 15 Nov 2022 13:35:46 +0000 Subject: [PATCH 1/4] Support worker_trace_events dataset in logspush jobs --- .../provider/schema_cloudflare_logpush_job.go | 37 +++++++++++++++++-- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/internal/provider/schema_cloudflare_logpush_job.go b/internal/provider/schema_cloudflare_logpush_job.go index 30d8857edd..78939bd2bc 100644 --- a/internal/provider/schema_cloudflare_logpush_job.go +++ b/internal/provider/schema_cloudflare_logpush_job.go @@ -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, From 1a8ecb692a270e6c99d97449512a7f185fa10ba7 Mon Sep 17 00:00:00 2001 From: Douglas Parsons Date: Tue, 15 Nov 2022 13:37:24 +0000 Subject: [PATCH 2/4] Update docs --- docs/resources/logpush_job.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/resources/logpush_job.md b/docs/resources/logpush_job.md index 58b79bea8c..e314632a54 100644 --- a/docs/resources/logpush_job.md +++ b/docs/resources/logpush_job.md @@ -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 From b8c65a2f22baab65bc5a3d97920e429e113ffe4a Mon Sep 17 00:00:00 2001 From: Douglas Parsons Date: Tue, 15 Nov 2022 13:39:26 +0000 Subject: [PATCH 3/4] Add changelog --- .changelog/2025.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/2025.txt diff --git a/.changelog/2025.txt b/.changelog/2025.txt new file mode 100644 index 0000000000..5f26415140 --- /dev/null +++ b/.changelog/2025.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +Support "workers_trace_events" dataset parameter +``` From 58d771ffe46e4830d8935ac1910819f9922ff336 Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Thu, 17 Nov 2022 08:38:36 +1100 Subject: [PATCH 4/4] Update .changelog/2025.txt --- .changelog/2025.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changelog/2025.txt b/.changelog/2025.txt index 5f26415140..914b4fe280 100644 --- a/.changelog/2025.txt +++ b/.changelog/2025.txt @@ -1,3 +1,3 @@ ```release-note:enhancement -Support "workers_trace_events" dataset parameter +resource/cloudflare_logpush_job: add support for `workers_trace_events` ```