Missing configuration leads to poor errors
See original GitHub issueIf I neglect to set my project, region, or zone configuration, I get an unhelpful error message:
error: Plan apply failed: project: required field is not set
Given that this will happen almost guaranteed for every new user of Pulumi on GCP, we should try to make this experience better. IIRC, we have some trick that we already use in the AWS package to hook errors like this and prettify them before displaying to the end user.
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (11 by maintainers)
Top Results From Across the Web
Disk configuration warning and error messages - IBM
You see a disk configuration warning or an error report on a display when your system detects errors or warning conditions in your...
Read more >.NET: Which Exception to Throw When a Required ...
You missed something: "when an application configuration setting is missing or contains an invalid value", that's not the same as bad user input ......
Read more >Error 0x74: Bad_system_config_info - Microsoft Support
This error means that something is wrong with the registry on your PC and you'll need to return to a previous configuration.
Read more >Early Detection of Configuration Errors to Reduce Failure ...
tomers' configuration issues of COMP-A. LC errors contribute to ... potential LC errors, and compensate for the missing and.
Read more >Config Checks and Messages - Wireless Troubleshooting Tools
The AP has configured a controller name as primary, secondary or tertiary, which is not present in the analyzed config file. This may...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I believe @ellismg and @jen20 looked into this and concluded it isn’t as easy as copying what we do in the AWS package, since you can set these on a per-resource basis.
This would be a very unfortunate conclusion. Here is a common experience with basic GCP programs, annotated with some of my own commentary/questions:
pulumi up
:Plan apply failed: project: required field is not set
gcloud
project? If I rungcloud info
, it prints out the very project I want to use…pulumi config set gcp:project my-project
pulumi up
:Plan apply failed: Cannot determine region: set in this resource, or set provider-level 'region' or 'zone'.
pulumi config set gcp:region us-east1
.@ellismg I know you had feedback on the GCP getting started flow. I’m actually wondering whether this was a problem for others on the team, or whether our tutorials make it so you don’t stumble here. (I’m always stumbling, but maybe I’m not paying close enough attention.) Thoughts?
Also /cc @swgillespie as I know improving errors is/was a passion of his, and I’m curious if he’s ever looked into this sort of “error rewriting” we might need to do on the fly in order to improve these messages.
I actually just ran into this, and until I found this issue it wasn’t at all clear what the issue way.
One thing that was very helpful with the AWS provider is that when a required field is missing, like the
aws:region
configuration option, you get a much more helpful error:Can we at least make the error message clearer, or have the previous comments indicated why that isn’t possible?