question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

unable to find required configuration setting: GCP Project

See original GitHub issue

The 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:closed
  • Created a year ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
guineveresaengercommented, Sep 1, 2022

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!

1reaction
snambercommented, Sep 1, 2022

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.

s, err := auto.UpsertStackInlineSource(ctx, stackName, p.Project, deployFunc)
if err != nil {
    ...
}
if err := s.SetAllConfig(ctx, map[string]auto.ConfigValue{
    "gcp:project": {Value: p.Project},
    }); err != nil {
    ...
}

I can see in the documentation that gcp:project is 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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found