davidji99 / terraform-provider-split

Terraform Split provider
https://registry.terraform.io/providers/davidji99/split/latest
Mozilla Public License 2.0
23 stars 8 forks source link

Fix split tags type and fix nil pointer deference in checkRateLimit #115

Closed bulju closed 1 year ago

bulju commented 1 year ago

This PR is to fix https://github.com/davidji99/terraform-provider-split/issues/114 Based on API calls to split, it doesn't return a list of strings in tags, it's a key/value.

> curl -X GET \
  -H 'Content-Type:application/json' \
  -H 'Authorization: Bearer <redacted>' \
  https://api.split.io/internal/api/v2/splits/ws/<redacted>/<redacted>/
{"id":"<redacted>","name":"<redacted>","description":"<redacted>","trafficType":{"id":"<redacted>","name":"user"},"creationTime":1583520739006,"tags":[{"name":"<redacted>"},{"name":"<redacted>"}],"owners":[{"id":"<redacted>","type":"user"},{"id":"<redacted>","type":"group"}]}

I also fixed a nil pointer deference that I introduced in #111