terraform-provider-restapi
terraform-provider-restapi copied to clipboard
Error: : invalid or unknown key: id
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)
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...
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
I'm having the same issue. Did you manage to get this resolved ?
+1
+1
+1