Skip to content
Start here

Logpush

LogpushDatasetsFields

data cloudflare_logpush_dataset_field

optional Expand Collapse
account_id?: String

The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.

zone_id?: String

The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.

dataset_id?: String

Name of the dataset. A list of supported datasets can be found on the Developer Docs.

cloudflare_logpush_dataset_field

data "cloudflare_logpush_dataset_field" "example_logpush_dataset_field" {
  dataset_id = "gateway_dns"
  account_id = "account_id"
  zone_id = "zone_id"
}

LogpushDatasetsJobs

data cloudflare_logpush_dataset_job

optional Expand Collapse
account_id?: String

The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.

zone_id?: String

The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.

dataset_id?: String

Name of the dataset. A list of supported datasets can be found on the Developer Docs.

computed Expand Collapse
dataset: String

Name of the dataset. A list of supported datasets can be found on the Developer Docs.

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.

enabled: Bool

Flag that indicates if the job is enabled.

error_message: String

If not null, the job is currently failing. Failures are usually. repetitive (example: no permissions to write to destination bucket). Only the last failure is recorded. On successful execution of a job the error_message and last_error are set to null.

Deprecatedfrequency: String

This field is deprecated. Please use max_upload_* parameters instead. . The frequency at which Cloudflare sends batches of logs to your destination. Setting frequency to high sends your logs in larger quantities of smaller files. Setting frequency to low sends logs in smaller quantities of larger files.

id: Int64

Unique id of the job.

kind: String

The kind parameter (optional) is used to differentiate between Logpush and Edge Log Delivery jobs (when supported by the dataset).

last_complete: Time

Records the last time for which logs have been successfully pushed. If the last successful push was for logs range 2018-07-23T10:00:00Z to 2018-07-23T10:01:00Z then the value of this field will be 2018-07-23T10:01:00Z. If the job has never run or has just been enabled and hasn't run yet then the field will be empty.

last_error: Time

Records the last time the job failed. If not null, the job is currently. failing. If null, the job has either never failed or has run successfully at least once since last failure. See also the error_message field.

Deprecatedlogpull_options: String

This field is deprecated. Use output_options instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from the logpull api, copy the url (full url or just the query string) of your call here, and logpush will keep on making this call for you, setting start and end times appropriately.

max_upload_bytes: Int64

The maximum uncompressed file size of a batch of logs. This setting value must be between 5 MB and 1 GB, or 0 to disable it. Note that you cannot set a minimum file size; this means that log files may be much smaller than this batch size.

max_upload_interval_seconds: Int64

The maximum interval in seconds for log batches. This setting must be between 30 and 300 seconds (5 minutes), or 0 to disable it. Note that you cannot specify a minimum interval for log batches; this means that log files may be sent in shorter intervals than this.

max_upload_records: Int64

The maximum number of log lines per batch. This setting must be between 1000 and 1,000,000 lines, or 0 to disable it. Note that you cannot specify a minimum number of log lines per batch; this means that log files may contain many fewer lines than this.

name: String

Optional human readable job name. Not unique. Cloudflare suggests. that you set this to a meaningful string, like the domain name, to make it easier to identify your job.

output_options: Attributes

The structured replacement for logpull_options. When including this field, the logpull_option field will be ignored.

batch_prefix: String

String to be prepended before each batch.

batch_suffix: String

String to be appended after each batch.

cve_2021_44228: Bool

If set to true, will cause all occurrences of ${ in the generated files to be replaced with x{.

field_delimiter: String

String to join fields. This field be ignored when record_template is set.

field_names: List[String]

List of field names to be included in the Logpush output. For the moment, there is no option to add all fields at once, so you must specify all the fields names you are interested in.

merge_subrequests: Bool

If set to true, subrequests will be merged into the parent request. Only supported for the http_requests dataset.

output_type: String

Specifies the output type, such as ndjson or csv. This sets default values for the rest of the settings, depending on the chosen output type. Some formatting rules, like string quoting, are different between output types.

record_delimiter: String

String to be inserted in-between the records as separator.

record_prefix: String

String to be prepended before each record.

record_suffix: String

String to be appended after each record.

record_template: String

String to use as template for each record instead of the default json key value mapping. All fields used in the template must be present in field_names as well, otherwise they will end up as null. Format as a Go text/template without any standard functions, like conditionals, loops, sub-templates, etc.

sample_rate: Float64

Floating number to specify sampling rate. Sampling is applied on top of filtering, and regardless of the current sample_interval of the data.

timestamp_format: String

String to specify the format for timestamps, such as unixnano, unix, rfc3339, rfc3339ms or rfc3339ns.

cloudflare_logpush_dataset_job

data "cloudflare_logpush_dataset_job" "example_logpush_dataset_job" {
  dataset_id = "gateway_dns"
  account_id = "account_id"
  zone_id = "zone_id"
}

LogpushJobs

resource cloudflare_logpush_job

required Expand Collapse
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.

optional Expand Collapse
account_id?: String

The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.

zone_id?: String

The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.

dataset?: String

Name of the dataset. A list of supported datasets can be found on the Developer Docs.

filter?: String

The filters to select the events to include and/or remove from your logs. For more information, refer to Filters.

Deprecatedlogpull_options?: String

This field is deprecated. Use output_options instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from the logpull api, copy the url (full url or just the query string) of your call here, and logpush will keep on making this call for you, setting start and end times appropriately.

max_upload_bytes?: Int64

The maximum uncompressed file size of a batch of logs. This setting value must be between 5 MB and 1 GB, or 0 to disable it. Note that you cannot set a minimum file size; this means that log files may be much smaller than this batch size.

max_upload_interval_seconds?: Int64

The maximum interval in seconds for log batches. This setting must be between 30 and 300 seconds (5 minutes), or 0 to disable it. Note that you cannot specify a minimum interval for log batches; this means that log files may be sent in shorter intervals than this.

max_upload_records?: Int64

The maximum number of log lines per batch. This setting must be between 1000 and 1,000,000 lines, or 0 to disable it. Note that you cannot specify a minimum number of log lines per batch; this means that log files may contain many fewer lines than this.

name?: String

Optional human readable job name. Not unique. Cloudflare suggests. that you set this to a meaningful string, like the domain name, to make it easier to identify your job.

ownership_challenge?: String

Ownership challenge token to prove destination ownership.

output_options?: Attributes

The structured replacement for logpull_options. When including this field, the logpull_option field will be ignored.

batch_prefix?: String

String to be prepended before each batch.

batch_suffix?: String

String to be appended after each batch.

cve_2021_44228?: Bool

If set to true, will cause all occurrences of ${ in the generated files to be replaced with x{.

field_delimiter?: String

String to join fields. This field be ignored when record_template is set.

field_names?: List[String]

List of field names to be included in the Logpush output. For the moment, there is no option to add all fields at once, so you must specify all the fields names you are interested in.

merge_subrequests?: Bool

If set to true, subrequests will be merged into the parent request. Only supported for the http_requests dataset.

output_type?: String

Specifies the output type, such as ndjson or csv. This sets default values for the rest of the settings, depending on the chosen output type. Some formatting rules, like string quoting, are different between output types.

record_delimiter?: String

String to be inserted in-between the records as separator.

record_prefix?: String

String to be prepended before each record.

record_suffix?: String

String to be appended after each record.

record_template?: String

String to use as template for each record instead of the default json key value mapping. All fields used in the template must be present in field_names as well, otherwise they will end up as null. Format as a Go text/template without any standard functions, like conditionals, loops, sub-templates, etc.

sample_rate?: Float64

Floating number to specify sampling rate. Sampling is applied on top of filtering, and regardless of the current sample_interval of the data.

timestamp_format?: String

String to specify the format for timestamps, such as unixnano, unix, rfc3339, rfc3339ms or rfc3339ns.

enabled?: Bool

Flag that indicates if the job is enabled.

Deprecatedfrequency?: String

This field is deprecated. Please use max_upload_* parameters instead. . The frequency at which Cloudflare sends batches of logs to your destination. Setting frequency to high sends your logs in larger quantities of smaller files. Setting frequency to low sends logs in smaller quantities of larger files.

kind?: String

The kind parameter (optional) is used to differentiate between Logpush and Edge Log Delivery jobs (when supported by the dataset).

computed Expand Collapse
id: Int64

Unique id of the job.

error_message: String

If not null, the job is currently failing. Failures are usually. repetitive (example: no permissions to write to destination bucket). Only the last failure is recorded. On successful execution of a job the error_message and last_error are set to null.

last_complete: Time

Records the last time for which logs have been successfully pushed. If the last successful push was for logs range 2018-07-23T10:00:00Z to 2018-07-23T10:01:00Z then the value of this field will be 2018-07-23T10:01:00Z. If the job has never run or has just been enabled and hasn't run yet then the field will be empty.

last_error: Time

Records the last time the job failed. If not null, the job is currently. failing. If null, the job has either never failed or has run successfully at least once since last failure. See also the error_message field.

cloudflare_logpush_job

resource "cloudflare_logpush_job" "example_logpush_job" {
  destination_conf = "s3://mybucket/logs?region=us-west-2"
  zone_id = "zone_id"
  dataset = "gateway_dns"
  enabled = false
  filter = "{\"where\":{\"and\":[{\"key\":\"ClientRequestPath\",\"operator\":\"contains\",\"value\":\"/static\"},{\"key\":\"ClientRequestHost\",\"operator\":\"eq\",\"value\":\"example.com\"}]}}"
  frequency = "high"
  kind = ""
  logpull_options = "fields=RayID,ClientIP,EdgeStartTimestamp&timestamps=rfc3339"
  max_upload_bytes = 5000000
  max_upload_interval_seconds = 30
  max_upload_records = 1000
  name = "example.com"
  output_options = {
    batch_prefix = ""
    batch_suffix = ""
    cve_2021_44228 = false
    field_delimiter = ","
    field_names = ["Datetime", "DstIP", "SrcIP"]
    merge_subrequests = true
    output_type = "ndjson"
    record_delimiter = ""
    record_prefix = "{"
    record_suffix = <<EOT
    }

    EOT
    record_template = "record_template"
    sample_rate = 1
    timestamp_format = "unixnano"
  }
  ownership_challenge = "00000000000000000000"
}

data cloudflare_logpush_job

required Expand Collapse
job_id: Int64

Unique id of the job.

optional Expand Collapse
account_id?: String

The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.

zone_id?: String

The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.

computed Expand Collapse
id: Int64

Unique id of the job.

dataset: String

Name of the dataset. A list of supported datasets can be found on the Developer Docs.

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.

enabled: Bool

Flag that indicates if the job is enabled.

error_message: String

If not null, the job is currently failing. Failures are usually. repetitive (example: no permissions to write to destination bucket). Only the last failure is recorded. On successful execution of a job the error_message and last_error are set to null.

Deprecatedfrequency: String

This field is deprecated. Please use max_upload_* parameters instead. . The frequency at which Cloudflare sends batches of logs to your destination. Setting frequency to high sends your logs in larger quantities of smaller files. Setting frequency to low sends logs in smaller quantities of larger files.

kind: String

The kind parameter (optional) is used to differentiate between Logpush and Edge Log Delivery jobs (when supported by the dataset).

last_complete: Time

Records the last time for which logs have been successfully pushed. If the last successful push was for logs range 2018-07-23T10:00:00Z to 2018-07-23T10:01:00Z then the value of this field will be 2018-07-23T10:01:00Z. If the job has never run or has just been enabled and hasn't run yet then the field will be empty.

last_error: Time

Records the last time the job failed. If not null, the job is currently. failing. If null, the job has either never failed or has run successfully at least once since last failure. See also the error_message field.

Deprecatedlogpull_options: String

This field is deprecated. Use output_options instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from the logpull api, copy the url (full url or just the query string) of your call here, and logpush will keep on making this call for you, setting start and end times appropriately.

max_upload_bytes: Int64

The maximum uncompressed file size of a batch of logs. This setting value must be between 5 MB and 1 GB, or 0 to disable it. Note that you cannot set a minimum file size; this means that log files may be much smaller than this batch size.

max_upload_interval_seconds: Int64

The maximum interval in seconds for log batches. This setting must be between 30 and 300 seconds (5 minutes), or 0 to disable it. Note that you cannot specify a minimum interval for log batches; this means that log files may be sent in shorter intervals than this.

max_upload_records: Int64

The maximum number of log lines per batch. This setting must be between 1000 and 1,000,000 lines, or 0 to disable it. Note that you cannot specify a minimum number of log lines per batch; this means that log files may contain many fewer lines than this.

name: String

Optional human readable job name. Not unique. Cloudflare suggests. that you set this to a meaningful string, like the domain name, to make it easier to identify your job.

output_options: Attributes

The structured replacement for logpull_options. When including this field, the logpull_option field will be ignored.

batch_prefix: String

String to be prepended before each batch.

batch_suffix: String

String to be appended after each batch.

cve_2021_44228: Bool

If set to true, will cause all occurrences of ${ in the generated files to be replaced with x{.

field_delimiter: String

String to join fields. This field be ignored when record_template is set.

field_names: List[String]

List of field names to be included in the Logpush output. For the moment, there is no option to add all fields at once, so you must specify all the fields names you are interested in.

merge_subrequests: Bool

If set to true, subrequests will be merged into the parent request. Only supported for the http_requests dataset.

output_type: String

Specifies the output type, such as ndjson or csv. This sets default values for the rest of the settings, depending on the chosen output type. Some formatting rules, like string quoting, are different between output types.

record_delimiter: String

String to be inserted in-between the records as separator.

record_prefix: String

String to be prepended before each record.

record_suffix: String

String to be appended after each record.

record_template: String

String to use as template for each record instead of the default json key value mapping. All fields used in the template must be present in field_names as well, otherwise they will end up as null. Format as a Go text/template without any standard functions, like conditionals, loops, sub-templates, etc.

sample_rate: Float64

Floating number to specify sampling rate. Sampling is applied on top of filtering, and regardless of the current sample_interval of the data.

timestamp_format: String

String to specify the format for timestamps, such as unixnano, unix, rfc3339, rfc3339ms or rfc3339ns.

cloudflare_logpush_job

data "cloudflare_logpush_job" "example_logpush_job" {
  job_id = 1
  account_id = "account_id"
  zone_id = "zone_id"
}

data cloudflare_logpush_jobs

optional Expand Collapse
account_id?: String

The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.

zone_id?: String

The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.

max_items?: Int64

Max items to fetch, default: 1000

computed Expand Collapse
result: List[Attributes]

The items returned by the data source

id: Int64

Unique id of the job.

dataset: String

Name of the dataset. A list of supported datasets can be found on the Developer Docs.

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.

enabled: Bool

Flag that indicates if the job is enabled.

error_message: String

If not null, the job is currently failing. Failures are usually. repetitive (example: no permissions to write to destination bucket). Only the last failure is recorded. On successful execution of a job the error_message and last_error are set to null.

Deprecatedfrequency: String

This field is deprecated. Please use max_upload_* parameters instead. . The frequency at which Cloudflare sends batches of logs to your destination. Setting frequency to high sends your logs in larger quantities of smaller files. Setting frequency to low sends logs in smaller quantities of larger files.

kind: String

The kind parameter (optional) is used to differentiate between Logpush and Edge Log Delivery jobs (when supported by the dataset).

last_complete: Time

Records the last time for which logs have been successfully pushed. If the last successful push was for logs range 2018-07-23T10:00:00Z to 2018-07-23T10:01:00Z then the value of this field will be 2018-07-23T10:01:00Z. If the job has never run or has just been enabled and hasn't run yet then the field will be empty.

last_error: Time

Records the last time the job failed. If not null, the job is currently. failing. If null, the job has either never failed or has run successfully at least once since last failure. See also the error_message field.

Deprecatedlogpull_options: String

This field is deprecated. Use output_options instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from the logpull api, copy the url (full url or just the query string) of your call here, and logpush will keep on making this call for you, setting start and end times appropriately.

max_upload_bytes: Int64

The maximum uncompressed file size of a batch of logs. This setting value must be between 5 MB and 1 GB, or 0 to disable it. Note that you cannot set a minimum file size; this means that log files may be much smaller than this batch size.

max_upload_interval_seconds: Int64

The maximum interval in seconds for log batches. This setting must be between 30 and 300 seconds (5 minutes), or 0 to disable it. Note that you cannot specify a minimum interval for log batches; this means that log files may be sent in shorter intervals than this.

max_upload_records: Int64

The maximum number of log lines per batch. This setting must be between 1000 and 1,000,000 lines, or 0 to disable it. Note that you cannot specify a minimum number of log lines per batch; this means that log files may contain many fewer lines than this.

name: String

Optional human readable job name. Not unique. Cloudflare suggests. that you set this to a meaningful string, like the domain name, to make it easier to identify your job.

output_options: Attributes

The structured replacement for logpull_options. When including this field, the logpull_option field will be ignored.

batch_prefix: String

String to be prepended before each batch.

batch_suffix: String

String to be appended after each batch.

cve_2021_44228: Bool

If set to true, will cause all occurrences of ${ in the generated files to be replaced with x{.

field_delimiter: String

String to join fields. This field be ignored when record_template is set.

field_names: List[String]

List of field names to be included in the Logpush output. For the moment, there is no option to add all fields at once, so you must specify all the fields names you are interested in.

merge_subrequests: Bool

If set to true, subrequests will be merged into the parent request. Only supported for the http_requests dataset.

output_type: String

Specifies the output type, such as ndjson or csv. This sets default values for the rest of the settings, depending on the chosen output type. Some formatting rules, like string quoting, are different between output types.

record_delimiter: String

String to be inserted in-between the records as separator.

record_prefix: String

String to be prepended before each record.

record_suffix: String

String to be appended after each record.

record_template: String

String to use as template for each record instead of the default json key value mapping. All fields used in the template must be present in field_names as well, otherwise they will end up as null. Format as a Go text/template without any standard functions, like conditionals, loops, sub-templates, etc.

sample_rate: Float64

Floating number to specify sampling rate. Sampling is applied on top of filtering, and regardless of the current sample_interval of the data.

timestamp_format: String

String to specify the format for timestamps, such as unixnano, unix, rfc3339, rfc3339ms or rfc3339ns.

cloudflare_logpush_jobs

data "cloudflare_logpush_jobs" "example_logpush_jobs" {
  account_id = "account_id"
  zone_id = "zone_id"
}

LogpushOwnership

resource cloudflare_logpush_ownership_challenge

required Expand Collapse
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.

optional Expand Collapse
account_id?: String

The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.

zone_id?: String

The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.

computed Expand Collapse
filename: String
message: String
valid: Bool

cloudflare_logpush_ownership_challenge

resource "cloudflare_logpush_ownership_challenge" "example_logpush_ownership_challenge" {
  destination_conf = "s3://mybucket/logs?region=us-west-2"
  zone_id = "zone_id"
}