I’m developing a provider and I see that there isn’t a way to surface user-errors back to the user. For instance, if a user has bad input on a field, my API still creates the resource (without the bad field), and sends back an error message about the bad field.
The only way I’ve been able to log out this error is by setting the TF_LOG variable. This is fine for me, but I want to have a nicer way of showing this to the user that doesn’t involve too much configuration and combing through logs.
It also doesn’t make sense for my use case to return an error since this “taints” my resource and causes it to be destroyed/recreated after the user corrects the mistake. I already handle partial state on my end, and after each create/update, I ask for the current state in my API before writing it in tf state, so partial state isn’t really the problem. I just want a way to show a warning message for bad input that doesn’t prevent overall resource creation.