big-psychiatrist-43588
07/07/2022, 11:26 AMerror: Error: invocation of gcp:organizations/getIAMPolicy:getIAMPolicy returned an error: unknown Invoke type "gcp:organizations/getIAMPolicy:getIAMPolicy"
at Object.callback (/home/workstation/thx/workspace/shared-services/30062022/thxcs-shared-services/node_modules/@pulumi/runtime/invoke.ts:159:33)
at Object.onReceiveStatus (/home/workstation/thx/workspace/shared-services/30062022/thxcs-shared-services/node_modules/@grpc/grpc-js/src/client.ts:338:26)
at Object.onReceiveStatus (/home/workstation/thx/workspace/shared-services/30062022/thxcs-shared-services/node_modules/@grpc/grpc-js/src/client-interceptors.ts:426:34)
at Object.onReceiveStatus (/home/workstation/thx/workspace/shared-services/30062022/thxcs-shared-services/node_modules/@grpc/grpc-js/src/client-interceptors.ts:389:48)
at /home/workstation/thx/workspace/shared-services/30062022/thxcs-shared-services/node_modules/@grpc/grpc-js/src/call-stream.ts:276:24
Here is my code
private createIAMBinding = (gsaKsaBinding: string, ksa: k8s.core.v1.ServiceAccount): void =>{
let account =pulumi.interpolate`serviceAccount:<projectId>.svc.id.goog[${this.namespace}/${ksa.metadata.name}]`;
const iam_role = gcp.organizations.getIAMPolicy({
bindings: [{
role: "roles/iam.workloadIdentityUser",
members: [account.get.name],
}],
},{provider: this.provider});
new gcp.serviceaccount.IAMPolicy(gsaKsaBinding, {
serviceAccountId: this.serviceAccountEmailId,
//project: project,
policyData: iam_role.then(iam_role => iam_role.policyData),
}, { dependsOn: [ksa], provider: this.provider });
}
Is there any clue why pulumi is throwing it