cloudflare-go
cloudflare-go copied to clipboard
Missing "description" field when adding items to the Teams Lists
Current cloudflare-go version
master
Description
Preface: I am aware that I have submitted what effectively constitutes as a Cloudflare API Feature Request. However, seeing that @jacobbednarz is one of key contributors, I felt that this GH repo is a good place to submit such a request, especially considering that the go library (and all other projects relying on it, such as Terraform, OpenTofu, etc.) should expose as well what is normally doable via UI.
There's lack of feature parity between Cloudflare Teams UI on one hand, and CF API and cloudflare-go library on the other hand.
When adding items to the Teams Lists (found under UI path: one.dash.cloudflare.com/<account_id>/team/lists/addManual
), apart from the value of each item, there's an optional Description that can be provided:
An API used to manage these lists (e.g. create: https://developers.cloudflare.com/api/operations/zero-trust-lists-create-zero-trust-list) accepts items
argument of type: array(object)
. However, the object only accepts the value
field.
Is it possible to extend the API to also allow providing the description here? Then, producing a PR for extending the cloudflare-go
library to support descriptions becomes possible.
Use cases
When managing Teams Lists that contain IP addresses, it is a good practice to supply a description for each item, to explain the item's source, intent, usage, etc. The description itself is usually defined in Terraform or other IaC scripts, along with the IP address, and it should be possible to create a List whose contents is composed of value:description pairs.
Potential cloudflare-go usage
I don't have a code usage example, but I can provide one if really required.
References
The original Teams Lists capability was introduced in terraform-go 3 years ago via #624.