Terraform logpush_job Key is missing error

I’m receiving a cryptic error in terraform when trying to apply using this config. The logpush job was created via the UI and has been imported, but when trying to apply I get the following error:

Error: error parsing logpush job from resource: Key is missing

with module.cf_dns_zones.cloudflare_logpush_job.datadog_http_requests

on …/…/modules/cf_dns_zones/logpush.tf line 1, in resource “cloudflare_logpush_job” “datadog_http_requests”:

This doesn’t make much sense to me, the dd_api_key variable is definitely set since it’s not nullable AND has a default value.

resource "cloudflare_logpush_job" "datadog_http_requests" {
  enabled          = true
  zone_id          = var.zone_id
  name             = "168446"
  dataset          = "http_requests"
  filter           = "{\"key\":\"ClientCountry\",\"operator\":\"!eq\",\"value\":\"us\"}"
  destination_conf = "datadog://http-intake.logs.us5.datadoghq.com/api/v2/logs?ddsource=cloudflare&ddtags=env:prod,source:cloudflare&service=cloudflare&header_DD-API-KEY=${var.dd_api_key}"
  logpull_options  = "fields=ClientIP,ClientRequestHost,ClientRequestMethod,ClientRequestURI,EdgeEndTimestamp,EdgeResponseBytes,EdgeResponseStatus,EdgeStartTimestamp,RayID,BotScore,CacheCacheStatus,ClientCountry,ClientDeviceType,ClientRegionCode,ClientRequestPath,EdgeColoCode,EdgeTimeToFirstByteMs,OriginResponseDurationMs,OriginResponseStatus&timestamps=rfc3339"
}

This is something that I would raise on the [terraform repo](GitHub - cloudflare/terraform-provider-cloudflare: Cloudflare Terraform Provider) and make sure to include the debug logs for it.

Never mind it seems you already have here though the debug log very light