Mastercard / terraform-provider-restapi

A terraform provider to manage objects in a RESTful API
Other
785 stars 215 forks source link

restapi_object data is not optional #260

Open Justin-DynamicD opened 5 months ago

Justin-DynamicD commented 5 months ago

right now data is a required string for the restapi_object, which causes issues with some providers.

Notably CircleCI uses a curl POST with no data to create a new project, with configurations added by a separate call.

(https://circleci.com/docs/api/v2/index.html#operation/createProject) vs. (https://circleci.com/docs/api/v2/index.html#operation/patchProjectSettings)

To clarify, a get will still return a valid object with ID, it's just that initial POST needs to be empty :(

I can easily use update_path to make changes, but I cannot omit a default data variable during the initial create, nor even make them two different resources as the resource requires a data value.