``` pulumi:pulumi:Stack testproject-test-dev 1 wa...
# general
e
Copy code
pulumi:pulumi:Stack testproject-test-dev  1 warning
    pulumi:providers:gcp default_7_32_0 **failed** 1 error
Diagnostics:
  pulumi:pulumi:Stack (testproject-test-dev):
    warning: failed to get regions list: failed to create compute service: google: could not find default credentials. See <https://cloud.google.com/docs/authentication/external/set-up-adc> for more information

  pulumi:providers:gcp (default_7_32_0):
    error: rpc error: code = Unknown desc = failed to load application credentials.
    To use your default gcloud credentials, run:
    	`gcloud auth application-default login`
    See <https://www.pulumi.com/registry/packages/gcp/installation-configuration/> for details.
    Expanded error message: Attempted to load application default credentials since neither `credentials` nor `access_token` was set in the provider block.  No credentials loaded. To use your gcloud credentials, run 'gcloud auth application-default login'.  Original error: google: could not find default credentials. See <https://cloud.google.com/docs/authentication/external/set-up-adc> for more information

Outputs:

Resources:
    ~ 1 updated
    1 unchanged

Duration: 1m20s
I am getting this error. I didn't use gcloud auth activate-service-account --key-file=/gcp_key.json because i want to have different keys for different gcloud resources ( like cloud build, or compute). I just use separate pulumi
gcp.NewProvider
to create providers based on the resources. What can i do here ?
m
It looks like you're trying to use the auto-configured default GCP provider to fetch a list of regions, likely because you have
gcp.compute.getRegions()
(docs) in your code but did not specify which provider should be used for that call (via the resource options), which leads to Pulumi defaulting back to the default GCP provider which you haven't configured.
You can also disable specific or all default providers, see the docs, which should make it more obvious where you haven't declared a specific provider to use.