cloudflare / terraform-provider-cloudflare

Cloudflare Terraform Provider
https://registry.terraform.io/providers/cloudflare/cloudflare
Mozilla Public License 2.0
770 stars 595 forks source link

Migrate logpush_job to use output_options #2173

Closed ShreedhanWise closed 7 months ago

ShreedhanWise commented 1 year ago

Current Terraform and Cloudflare provider version

1.0.0

Description

Cloudflare are replacing logpull_options with output_options which provides new functionality: https://developers.cloudflare.com/logs/reference/log-output-options/

Please can we support the new output_options format?

Use cases

As a user, I would like to export log files as CSV files (which output_options allows) so that I can import them into my datawarehouse natively.

Potential Terraform configuration

  enabled             = true
  zone_id             = id
  destination_conf    = local.destination_conf
  dataset             = "http_requests"
  frequency           = "low"
  ownership_challenge = data.aws_s3_object.challenge_file_seo.body
  output_options = jsonencode({
    where = {
      field_names      = ["BotScore", "BotScoreSrc", "BotTags", "ClientRequestHost", "ClientRequestMethod", "ClientRequestURI", "ClientRequestPath", "ClientRequestUserAgent", "EdgeEndTimestamp", "EdgeResponseBytes", "EdgeResponseStatus", "EdgeStartTimestamp", "RayID", "ClientDeviceType", "ClientIPClass", "EdgeResponseContentType"]
      timestamp_format = "rfc3339"
      output_type      = "csv"
    }
  })
  filter = jsonencode({
    where = {
      key      = "ClientIPClass"
      operator = "eq"
      value    = "searchEngine"
    }
  })
}

References

No response

STSweeneyCF commented 1 year ago

This has been flagged with the Data (Logs) team for escalation. PM is currently OOO. Will get an approx ETA from her upon return

github-actions[bot] commented 6 months ago

This functionality has been released in v4.27.0 of the Terraform Cloudflare Provider.

Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!