unable to find required configuration setting: GCP Project
See original GitHub issueThe new auth config validation is causing deployments to break that do not set the default gcp:project key.
Initial thoughts:
This chunk of code is too zealous and we can begin by removing it and roll the error into the gcloud config validation below: https://github.com/pulumi/pulumi-gcp/blob/master/provider/resources.go#L187 That will fix things for users who have non-default settings.
We can then look into how the underlying provider works - exactly how the GCP project is required and under which circumstances
If necessary/unaccounted for in the auth helper library, we should add validation tests that take into account all authentication scenarios.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Invoke() called before Configure() · Issue #10446 · pulumi ...
I was using a callback function to intercept the Configure() ... error: unable to find required configuration setting: GCP Project Set the ...
Read more >Google Cloud (GCP) Classic Installation & Configuration
Use pulumi config set gcp:<option> or pass options to the constructor of new gcp.Provider . Option, Required/Optional, Description. project, Required, The ID of ......
Read more >Troubleshooting Cloud Endpoints configuration deployment
After Service Management creates the managed service, the minimum required permissions to redeploy an Endpoints configuration is the Service Config Editor role ...
Read more >Google Cloud Platform Service Account is Unable to Access ...
Select $PROJECT as the above service account: gcloud config set project $PROJECT #=> Updated property [core/project]. WARNING: You do not ...
Read more >Google Cloud projects | Apps Script
To configure and manage these settings, every Apps Script project has an ... users can't directly locate, view, or edit default projects in...
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

Upstream, incidentally, does not enforce this as a requirement either - so we may never need/want to make it required.
I like the warning-and-continue approach very much as well. Thank you @snamber!
Background: I posted about this issue in the Slack channel
In the end this is just a breaking change that requires (when using the automation API) a few lines of code and in the case of a custom configuration in interactive mode potentially also one line of code, but this line is even suggested in the error message.
v6.36.0 of the pulumi-gcp plugin works after adding this snippet, individual resources can still be created in different projects.
I can see in the documentation that
gcp:projectis a required field. Maybe this requirement was just never enforced, but it seems to be according to the specification, so while this may break people’s existing configs, these configs seem not to have been to spec in that case.Maybe as an alternative to rolling back completely an additional line warning of this potential breaking change in the release notes / changelog would also do to point people in the right direction.