zorkian / go-datadog-api

A Go implementation of the Datadog API.
BSD 3-Clause "New" or "Revised" License
183 stars 156 forks source link

Add IP ranges #259

Closed dabcoder closed 5 years ago

dabcoder commented 5 years ago

Could be used in the terraform provider as there is an open feature request for that: https://github.com/terraform-providers/terraform-provider-datadog/issues/216.

WIP, so the approach may not be the best.

bkabrda commented 5 years ago

Hey David, thanks for submitting this PR. The GetIPRanges function should look more like any other function for getting all entities, e.g. have a look at https://github.com/zorkian/go-datadog-api/blob/master/api_keys.go#L74 - Most of the boilerplate code you've written is actually covered by the client.doJsonRequest, so I'd suggest using that. Does that make sense?