Mastercard / terraform-provider-restapi

A terraform provider to manage objects in a RESTful API
Other
808 stars 217 forks source link

Error: : invalid or unknown key: id #153

Open o1da opened 2 years ago

o1da commented 2 years ago

Hi, I wanted to force ID of a resource to fixed value, so I tried to use optional parameter id (String, Optional) The ID of this resource.

But terraform (1.0.9) is returning Error: : invalid or unknown key: id isn't id protected attribute or something? https://github.com/DataDog/terraform-provider-datadog/issues/947

I am using restapi provider in version 1.15.0 (I can't use 1.16.0 due issues with state read of externally deleted resources https://github.com/Mastercard/terraform-provider-restapi/issues/77)

DRuggeri commented 2 years ago

Hi, @o1da - you are correct... we're seeing the same thing that the datadog folks saw - the autogenerated docs are spitting out data fields that the provider doesn't actually expose.

I'll look into why that is happening. A cursory look at the datadog commit history shows they had to fix the doc manually, but that won't quite work out for this project since the generation of the docs is part of the release process.

I'll have to do some spelunking...

ghost commented 2 years ago

Hello! I've also faced similar issue. The API endpoint that I'm using has response code "204 No content" and the response body is empty. This way the resource ID can't be detected: internal validation failed; object ID is not set, but *may* have been created; this should never happen

If I try to set the ID manually i get the error invalid or unknown key: id

arunsudhakar commented 2 years ago

I'm having the same issue. Did you manage to get this resolved ?

thierryturpin commented 2 years ago

+1

scholdan commented 2 years ago

+1

matthowardcohere commented 1 year ago

+1