cloudflare / cloudflare-go

The official Go library for the Cloudflare API
https://developers.cloudflare.com/api
BSD 3-Clause "New" or "Revised" License
1.38k stars 550 forks source link

Feat/add gateway categories #2722

Closed brennoo closed 5 days ago

brennoo commented 6 days ago

This pull request adds support for the ListGatewayCategories endpoint.

Description

Our main driver is that we are looking into have this data available as a data resource in the terraform provider, please let me know if this is the right direction.

Has your change been tested?

besides the test case I created this script and the output seems correct

Types of changes

What sort of change does your code introduce/modify?

Checklist:

github-actions[bot] commented 6 days ago

changelog detected :white_check_mark:

jacobbednarz commented 6 days ago

this functionality already exists in v2 - is there a reason why we cannot use that instead?

brennoo commented 5 days ago

this functionality already exists in v2 - is there a reason why we cannot use that instead?

no specific reason, I think when I was going thru the provider code I read somewhere that v2 should not be used

jacobbednarz commented 5 days ago

you may have misunderstood; the Terraform SDKv2 shouldn't be used. the v2 Go library is where we are moving towards.

we can merge this since it's already done but the Terraform provider should use v2 where possible (as that is what we're using going forward).

brennoo commented 5 days ago

yep it is clear to me I mixed the V2s - if you think there is value in it feel free to merge - I will get back to the provider and when I start something I will use V2 Go library

thanks Jacob!