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 itNo matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by