sparse-intern-71089
11/24/2020, 2:58 PMlittle-cartoon-10569
11/24/2020, 8:00 PMup-time.little-cartoon-10569
11/24/2020, 8:01 PMconstructor(name, args, opts) {
super('pkg:CustomComponent', name, {}, opts)
const computeDefaultServiceAccount = gcp.compute.getDefaultServiceAccount({project: projectId});
gcp.projects.IAMBinding('blah', { role: '', project: projectId, members: [pulumi.interpolate`serviceAcccount:${computeDefaultServiceAccount.email}`]}
}little-cartoon-10569
11/24/2020, 8:01 PMlittle-cartoon-10569
11/24/2020, 8:02 PMmembers property takes a pulumi.Input<string>[] rather than just a string[]. Not all properties do.. it can be tricky to get it working in cases where a string is required...billowy-army-68599
little-cartoon-10569
11/24/2020, 10:54 PMnarrow-area-20379
11/24/2020, 11:48 PMmembers: [gcp.compute
.getDefaultServiceAccount({ project: args.projectId })
.then(sa => `serviceAccount:${sa.email}`)]narrow-area-20379
11/24/2020, 11:50 PMlittle-cartoon-10569
11/24/2020, 11:55 PMlittle-cartoon-10569
11/25/2020, 12:01 AMpulumi.interpolate, is the example. I'll see if I can find one in the github repo, shouldn't be too hard.little-cartoon-10569
11/25/2020, 12:04 AMlittle-cartoon-10569
11/25/2020, 12:05 AMlittle-cartoon-10569
11/25/2020, 12:08 AMup-time" just by checking that it's some type of Output. pulumi.interpotate returns an Output, and you can't view its value until you run pulumi up.narrow-area-20379
11/25/2020, 12:08 AMlittle-cartoon-10569
11/25/2020, 12:10 AMmembers property is an array of Input<string> and thus can deal with stuff that is resolved at up-time. Which is what pulumi.interpolate does.narrow-area-20379
11/25/2020, 12:22 AMnarrow-area-20379
11/25/2020, 12:26 AMlittle-cartoon-10569
11/25/2020, 12:39 AMlittle-cartoon-10569
11/25/2020, 12:40 AMnarrow-area-20379
11/25/2020, 12:48 AMlittle-cartoon-10569
11/25/2020, 12:59 AM