You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
But when use terraform always send a data and then my API needs a few parameters on payload that I cant send.
2024-10-22T14:25:51.013+0200 [INFO] provider.terraform-provider-restapi_v1.20.0: 2024/10/22 14:25:51 api_client.go: method='GET', path='/api/v2/firewall/alias?id=18', full uri (derived)='https://xxxxxxx.com/api/v2/firewall/alias?id=18', data='': timestamp="2024-10-22T14:25:51.013+0200"
note the data=''. It seams that the provider always send the data. I think if this parameter is null or empty or we not provide on tf file, the request should not sent the data.
Error: unexpected response code '400': {"code":400,"status":"bad request","response_id":"MODEL_REQUIRES_ID","message":"Field `id` is required.","data":[]}
Maybe the option that sugest Justin-DynamicD in this comment, Adding a few parameters can be a valid solution:
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.
The text was updated successfully, but these errors were encountered: