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

cloudflare_logpush_job - Support filter #1632

Closed
jcolfej opened this issue May 18, 2022 · 1 comment · Fixed by #1660
Closed

cloudflare_logpush_job - Support filter #1632

jcolfej opened this issue May 18, 2022 · 1 comment · Fixed by #1660
Labels
kind/enhancement Categorizes issue or PR as related to improving an existing feature. triage/accepted Indicates an issue or PR is ready to be actively worked on. workflow/pending-upstream-library Indicates an issue or PR requires changes from an upstream library.
Milestone

Comments

@jcolfej
Copy link

jcolfej commented May 18, 2022

Current Terraform and Cloudflare provider version

Terraform v1.1.9
on darwin_arm64

  • provider registry.terraform.io/cloudflare/cloudflare v3.14.0
  • provider registry.terraform.io/hashicorp/aws v4.14.0

Description

The objective is to support filter on logpush job.
Check https://developers.cloudflare.com/logs/reference/logpush-api-configuration/filters/

Use cases

Allow to create logpush job with filter like for example, only export requests with request host equals to "www.example.com" or "example.com".

Potential Terraform configuration

resource "cloudflare_logpush_job" "this" {
  zone_id = cloudflare_zone.this.id

  name    = "my-test-job"
  enabled = true

  destination_conf    = "s3://cloudflare-logpush-test/{DATE}?region=us-east-1&sse=AES256"
  ownership_challenge = data.aws_s3_object.this.body

  dataset         = "http_requests"
  logpull_options = "fields=ClientIP,ClientRequestHost,ClientRequestMethod,ClientRequestPath,ClientRequestProtocol,ClientRequestReferer,ClientRequestScheme,ClientRequestURI,ClientRequestUserAgent,EdgeEndTimestamp,EdgeResponseBytes,EdgeResponseStatus&timestamps=rfc3339"

  filter = jsonencode({
    where = {
        key = "ClientRequestHost"
        operator = "in"
        value = [
          "example.com",
          "www.example.com"
        ]
      }
  })
}

References

No response

@jcolfej jcolfej added kind/enhancement Categorizes issue or PR as related to improving an existing feature. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels May 18, 2022
@jacobbednarz jacobbednarz added workflow/pending-upstream-library Indicates an issue or PR requires changes from an upstream library. triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels May 18, 2022
@github-actions github-actions bot added this to the v3.17.0 milestone Jun 8, 2022
@github-actions
Copy link
Contributor

This functionality has been released in v3.17.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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Categorizes issue or PR as related to improving an existing feature. triage/accepted Indicates an issue or PR is ready to be actively worked on. workflow/pending-upstream-library Indicates an issue or PR requires changes from an upstream library.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants