This message was deleted.
# typescript
s
This message was deleted.
n
strangely it works when i add log statement
Copy code
serviceAccount.apply(email => console.log("Service Account Email: ", email));
b
this code isn’t correct:
Copy code
this.admin_policy = pulumi.output(gcp.organizations.getIAMPolicy({
            bindings: [
                {
                    role: "roles/secretmanager.secretAccessor",
                    members: [
                        `serviceAccount:${email.apply(e=>e)})}`,
                    ],
                },
            ],
        }, { parent: this }));
You can’t do
email.apply
here, it needs to be at the root of the string build, so
Copy code
bindings: email.apply(e => ...
n
that doesn't work
Copy code
Type 'Output<{ role: string; members: string[]; }[]>' is not assignable to type 'GetIAMPolicyBinding[] | undefined'.
  Type 'OutputInstance<{ role: string; members: string[]; }[]> & LiftedArray<{ role: string; members: string[]; }>' is missing the following properties from type 'GetIAMPolicyBinding[]': pop, push, concat, join, and 25 more.ts(2322)
@billowy-army-68599
b
what do you have?
n
Copy code
this.admin_policy = pulumi.output(gcp.organizations.getIAMPolicy({
            bindings: email.apply( email => [
                {
                    role: "roles/secretmanager.secretAccessor",
                    members: [
                        `serviceAccount:${email}`,
                    ],
                },
            ]),
        }, { parent: this }));
b
I’m no expert in gcp, but it looks like by wrapping in
pulumi.output
the type bindings are correct
n
@billowy-army-68599 yeah i am lost, no idea what to do from here on out. I'm able to get things working when i deploy locally but Github actions fails
it shouldn't be a gcp specific issue