Skip to content

Flaconi/terraform-cloudflare-logpush-s3

Repository files navigation

terraform-cloudflare-logpush-s3

Template for Terraform modules

lint test Tag Terraform License

Providers

Name Version
aws ~> 6.8
cloudflare ~> 5.8

Requirements

Name Version
terraform ~> 1.3
aws ~> 6.8
cloudflare ~> 5.8

Required Inputs

The following input variables are required:

Description: Cloudflare domain to fetch the zone id

Type: string

Description: The single, unique name of the S3 bucket for logs and for the ownership challenge file.

Type: string

Description: The name of the job to create

Type: string

Optional Inputs

The following input variables are optional (have default values):

Description: The kind of the dataset

Type: string

Default: "http_requests"

Description: The path or prefix within the S3 bucket where logs should be stored.

Type: string

Default: ""

Description: The AWS region used for S3 mirror in case if ownership_challenge is provided.

Type: string

Default: "eu-central-1"

Description: Whether to enable the job

Type: bool

Default: true

Description: Filter to include/exclude events

Type: map(any)

Default: null

Description: The kind of job to create

Type: string

Default: null

Description: The maximum uncompressed file size of a batch of logs

Type: number

Default: 5000000

Description: The maximum interval in seconds for log batches

Type: number

Default: 30

Description: The maximum number of log lines per batch.

Type: number

Default: 1000

Description: Configuration string for requested fields and timestamp formats

Type:

object({
    batch_prefix     = optional(string)
    batch_suffix     = optional(string)
    cve_2021_44228   = optional(bool, false)
    field_delimiter  = optional(string)
    field_names      = optional(list(string))
    output_type      = optional(string, "ndjson")
    record_delimiter = optional(string)
    record_prefix    = optional(string)
    record_suffix    = optional(string)
    record_template  = optional(string)
    # Floating number to specify sampling rate. Sampling is applied on top of filtering, and regardless of the current sample_interval of the data
    sample_rate      = optional(number)
    timestamp_format = optional(string, "rfc3339")
  })

Default: {}

Description: Challenge to confirm ownership of the destination (if provided)

Type: string

Default: null

Outputs

Name Description
job A created logpush job

License

MIT License

Copyright (c) 2025 Flaconi GmbH

About

This module will create Cloudflare Logpush Jobs for AWS S3

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •