-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Poor error when missing AWS creds #192
Comments
I'll look into this in more detail today but I worry that there's not much we can do here. If we're ultimately bottoming-out with Terraform providers, their error messages when they fail to initialize will pretty much always be framed in terms of Terraform. With config keys, we're lucky in that we can inspect the schema for providers that use them and present an error before we involve Terraform providers at all. If the AWS provider returns some sort of structured error, perhaps we can intercept it and present a better error message, but I suspect that we're going to get back a string error message (and in general, from the TF bridge level, we can't make any assumptions about the kinds of errors that get spit out). Also, I'm not sure what we'd want this error message to say instead of what it does. We are using a Terraform provider, so it makes sense that we'd link to Terraform docs about how to authenticate with the provider. If we didn't, we'd have to write docs of our own that basically re-phrase exactly what the Terraform docs say. |
FWIW - It's also not clear we could/would have been reporting a better error previously. We didn't ever have any of our own validation of AWS credentials, so we would always have been hitting the TF provider to be the place this error would get reported in a case that it does. The only way I can imagine fixing this is to replicate all of the TF providers logic around configuration into our package, so that we can return our own error messages in all the failure cases instead of letting TF produce errors. The only other option will be to string match errors with regexs and transform them. Feels pretty brittle, but maybe worth it if we think this is common? |
I spent some time investigating with this and I agree with this 100%:
Our terraform wrapper in |
This allows providers to pre-validate configuration, and in particualr credentials, before handing off to the TF provider. Part of addressing pulumi/pulumi-aws/issues/192 and pulumi/home/issues/241.
Validates that provider credentials can be gathered correctly before handing off to the provider Configure method. This allows more actionable error messages to be reported. Fixes #192. Fixes pulumi/home#241.
Validates that provider credentials can be gathered correctly before handing off to the provider Configure method. This allows more actionable error messages to be reported. Fixes #192. Fixes pulumi/home#241.
This allows providers to pre-validate configuration, and in particualr credentials, before handing off to the TF provider. Part of addressing pulumi/pulumi-aws/issues/192 and pulumi/home/issues/241.
This allows providers to pre-validate configuration, and in particualr credentials, before handing off to the TF provider. Part of addressing pulumi/pulumi-aws/issues/192 and pulumi/home/issues/241.
This allows providers to pre-validate configuration, and in particualr credentials, before handing off to the TF provider. Part of addressing pulumi/pulumi-aws/issues/192 and pulumi/home/issues/241.
Validates that provider credentials can be gathered correctly before handing off to the provider Configure method. This allows more actionable error messages to be reported. Fixes #192. Fixes pulumi/home#241.
Validates that provider credentials can be gathered correctly before handing off to the provider Configure method. This allows more actionable error messages to be reported. Fixes #192. Fixes pulumi/home#241.
If you forget to configure AWS creds, you get a poor error message:
This seems to have regressed recently. Worse, it includes a Terraform URL, which is completely useless to anybody using the Pulumi CLI. Maybe we can leverage some of @swgillespie's recent magic to make this better?
The text was updated successfully, but these errors were encountered: