Comments (3)
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.
from pulumi-aws.
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?
from pulumi-aws.
I spent some time investigating with this and I agree with this 100%:
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.
Our terraform wrapper in pulumi-aws
is so thin that I don't see any good place for us to interpose on this error message. We could do so in pulumi-terraform
, but it feels extremely wrong to me to try and regex parse error messages for specific providers in there. We can certainly do it, of course, but even if we did I'm not sure what the error message would say that it doesn't already say. If we're using the TF provider to handle authentication, we're going to have to direct people to the TF provider's documentation so they can see exactly how the provider is doing it.
from pulumi-aws.
Related Issues (20)
- Upgrade terraform-provider-aws to v5.17.0 HOT 3
- EC2 InstateState attribute/modifier misplaced under TransitGateway HOT 2
- Panic when trying to update AWS wafv2 WebAcl HOT 11
- Upgrade terraform-provider-aws to v5.17.0 manual HOT 1
- Pulumi CLI panics on `preview` when trying to create a new `aws.Provider` for a new `aws.organizations.Account` HOT 8
- Secret tags inherited from the default provider leak into the state HOT 2
- Upgrade terraform-provider-aws to v5.18.0 HOT 2
- aws.rds.Instance replacement when upgrading from 5.42.0 to 6.2.0 HOT 5
- PATCH-0030 Restore-S3ConnURICleaningDisabled.patch HOT 2
- Upgrade terraform-provider-aws to v5.18.1
- Autoscaling Group updates resource but fails program. Inputs and Outputs are out of sync HOT 1
- publish_sdk failure on master branch HOT 2
- StackSetInstance fails when deploying to ou with no accounts HOT 7
- 'AwaitableGetOrganizationalUnitsResult' object has no attribute 'childrens' HOT 1
- Upgrade terraform-provider-aws to v5.19.0
- Workflow failure: Upgrade bridge
- Cognito UserPool Schema diff - incorrect HOT 4
- Import Quicksight Analysis is missing definition part HOT 2
- Error when trying to import aws.wafv2.WebAcl HOT 2
- DynamoDB GSI minor autoscaling update in AWS is interpreted by Pulumi as GSIs requiring major changes HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pulumi-aws.