orange-tailor-85423
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 stringpulumi.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 AMorange-tailor-85423
02/06/2019, 2:04 AMgentle-diamond-70147
02/06/2019, 2:33 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.pulumi.interpolate...
on the member
value will worktypescript
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
});
});
});
}