Hello, I am having a tough time with configuring O...
# general
c
Hello, I am having a tough time with configuring OIDC - I have tried already many combinations of audiences, but I have still one error:
Copy code
Diagnostics:
18
   pulumi:pulumi:Stack (smilingwords-gcp-management-prod):
19
     warning: unable to detect a global setting for GCP Project;
20
     Pulumi will rely on per-resource settings for this operation.
21
     Set the GCP Project by using:
22
     	`pulumi config set gcp:project <project>`
23
     warning: unable to detect a global setting for GCP Project;
24
     Pulumi will rely on per-resource settings for this operation.
25
     Set the GCP Project by using:
26
     	`pulumi config set gcp:project <project>`
27
     error: Running program '/deployment/index.ts' failed with an unhandled exception:
28
     [36m<ref *1>[39m Error: invocation of gcp:projects/getProject:getProject returned an error: invoking gcp:projects/getProject:getProject: 1 error occurred:
29
     	* Error retrieving projects: Get "<https://cloudresourcemanager.googleapis.com/v1/projects?alt=json&filter=name%3Asmw-bot+lifecycleState%3AACTIVE+labels.smw_bot%3Ay+labels.pulumi%3Ay>": oauth2/google: unable to generate access token: Post "<https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/smw-bot-serviceaccount@smw-bot-qowk5.iam.gserviceaccount.com:generateAccessToken>": oauth2/google: status code 400: {"error":"invalid_target","error_description":"The target service indicated by the \"audience\" parameters is invalid. This might either be because the pool or provider is disabled or deleted or because it doesn't exist."}
30

31

32
         at Object.callback [90m(/deployment/[39mnode_modules/[4m@pulumi[24m/runtime/invoke.ts:172:37[90m)[39m
33
         at Object.onReceiveStatus [90m(/deployment/[39mnode_modules/[4m@grpc[24m/grpc-js/src/client.ts:360:26[90m)[39m
34
         at Object.onReceiveStatus [90m(/deployment/[39mnode_modules/[4m@grpc[24m/grpc-js/src/client-interceptors.ts:458:34[90m)[39m
35
         at Object.onReceiveStatus [90m(/deployment/[39mnode_modules/[4m@grpc[24m/grpc-js/src/client-interceptors.ts:419:48[90m)[39m
36
         at [90m/deployment/[39mnode_modules/[4m@grpc[24m/grpc-js/src/resolving-call.ts:132:24
37
     [90m    at processTicksAndRejections (node:internal/process/task_queues:77:11)[39m {
38
       promise: Promise { [36m<rejected>[39m [36m[Circular *1][39m }
39
     }
What is the issue or how it can be solved? It would be very nice if someone would have the answer! Please help 😕 Thanks in advance!
s
The first portion of the error text you posted can be addressed by explicitly setting the GCP project using
pulumi config set gcp:project <project>
. It’s possible that, by setting the GCP project, it will also resolve the second portion of the error text, which pertains to an incorrect
audience
. I’d advise that you start with setting the GCP project using
pulumi config set
and see if that resolves both portions of the error. If not, come back here and we’ll see what we can figure out! 🙂