kevholditch / terraform-provider-kong

kong provider for terraform
MIT License
179 stars 91 forks source link

Fix consumer creation with missing properties #138

Closed andrew-bulford-form3 closed 3 years ago

andrew-bulford-form3 commented 3 years ago

Previously the username or custom_id properties being absent would cause an error from Kong, because the properties would be sent as empty strings instead of being absent or null.

This partially fixes #137. To completely fix it we also need to apply the same change to the resourceKongConsumerUpdate function, but currently that doesn't have the desired effect due to https://github.com/Kong/go-kong/issues/94. Once a fix for https://github.com/Kong/go-kong/issues/94 is available in go-kong we can update to this version and complete the fix here.

Alternatively we could fork go-kong, implement a fix, and update this repo to refer to the fork - @kevholditch let me know if you'd like me to do this or submit the update fix in a later PR.