sparse-intern-71089
02/06/2019, 1:50 AMgentle-diamond-70147
02/06/2019, 1:54 AM[object Object]
in the error, I think you need to tell Pulumi to transform the sa's outputs to the new stringgentle-diamond-70147
02/06/2019, 1:55 AMpulumi.interpolate`${project}:${role}:${sa.email}`
and
pulumi.interpolate`serviceAccount:${sa.email}`
orange-tailor-85423
02/06/2019, 2:01 AMgentle-diamond-70147
02/06/2019, 2:04 AMgentle-diamond-70147
02/06/2019, 2:04 AMorange-tailor-85423
02/06/2019, 2:04 AMorange-tailor-85423
02/06/2019, 2:05 AMgentle-diamond-70147
02/06/2019, 2:33 AMgentle-diamond-70147
02/06/2019, 2:46 AMstring
all other arguments require pulumi.Input<String>
. Pulumi needs the resource name "early" to ensure uniqueness so it can't depend on any Output
values.gentle-diamond-70147
02/06/2019, 2:46 AMpulumi.interpolate...
on the member
value will workgentle-diamond-70147
02/06/2019, 2:47 AMgentle-diamond-70147
02/06/2019, 2:49 AMtypescript
export function createIamMemberFromServiceAccount(
roles: string[],
members: gcp.serviceAccount.Account[],
project: string
) {
roles.forEach(role => {
members.forEach((sa, idx) => {
new gcp.projects.IAMMember(`${project}:${role}-${idx}`, {
member: pulumi.interpolate`serviceAccount:${sa.email}`,
project,
role
});
});
});
}
gentle-diamond-70147
02/06/2019, 2:59 AMgentle-diamond-70147
02/06/2019, 5:00 PM