d.Set("non-existing") doesn't return error

I just tried to set non-existing with d.Set("whatever", "") in Read function, and Terraform v0.12.24 silently accepted this instruction. No state had been set, but should there be at least an error in the debug log?

I’d agree a d.Set on a non-existant field should return an error. If you checked the error that d.Set returns (or ran with TF_SCHEMA_PANIC_ON_ERROR set to 1) and it didn’t surface an error, I’d love an enhancement request so we can track the work for that. I don’t know if it’s something we can do, but it makes sense to me from a user perspective, so we should track that enhancement request.

1 Like