terraform-provider-cloudflare
terraform-provider-cloudflare copied to clipboard
add datasource to pull all available log fields
Current Terraform version
0.14.8
Description
is it possible to add a datasource to pull all the log fields?
they are available here:
https://api.cloudflare.com/client/v4/zones/<zone_id>/logpush/datasets/
Use cases
in order to properly construct the logpush job that is up to date with the fields available, would be nice to have it as a datasource
Potential Terraform configuration
none
References
No response
hi @jacobbednarz, which upstream library needs to be updated for this? using null provisioner with local exec to get this is very fragile
the terraform provider uses cloudflare-go under the hood for the API calls; it doesn't implement anything itself. so before we can do anything here, that library needs it.
cloudflare-go should support the required api calls now that it supports account-level logpush jobs via GetAccountLogpushFields
and GetZoneLogpushFields
. I'll probably try to get around to working on a PR this week unless someone else works on it.
fwiw, i've also requested that logpush/logpull simply support fields=ALL
or similar to remove this requirement entirely when you just want everything... but who knows if/when that'll ever get implemented.
This issue has been closed as we are now tracking this internally with service teams directly. If you would like an update or to be notified when/if the product ships with this change, please reach out to Cloudflare Support or your account team who can watch the internal feature request for you.