Cox-Automotive / terraform-provider-alks

Terraform Provider for ALKS
MIT License
37 stars 23 forks source link

Missing provider config error handling #183

Open brianantonelli opened 2 years ago

brianantonelli commented 2 years ago

If the ALKS provider is defined and resources are used but no provider config is given there is a very vague error message returned.

│ Error: Missing required argument
│ 
│ The argument "url" is required, but was not set.

While this message makes sense, it is not clear that its being thrown from the ALKS provider. The provider should supply additional information to indicate where the error originated. Currently this is only debuggable by putting Terraform into debug mode which shows the error comes from the ALKS provider:

..... 
2022-11-19T00:16:36.133-0500 [ERROR] vertex "provider[\"registry.terraform.io/cox-automotive/alks\"]" error: Missing required argument
.....
2022-11-19T00:16:39.938-0500 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2022-11-19T00:16:39.940-0500 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/cox-automotive/alks/2.7.1/darwin_amd64/terraform-provider-alks_v2.7.1 pid=87573