There's a way to create a Pulumi `gcp.serviceaccou...
# general
There's a way to create a Pulumi
that accepts multiple roles like from a list like this
['roles/iam.serviceAccountUser', 'roles/storage.admin']
? Using typescript btw. Every time I try to add something like that I see this error. But I would like to have a module it can be reused, and providing a list I can reuse that for many purposes.
Copy code
error: gcp:serviceaccount/iAMMember:IAMMember resource 'prod-sa-runner' has a problem: Attribute must be a single value, not a list. Examine values at 'prod-sa-runner.role'.
You can iterate over the list to create multiple IAMMember resources
Can you give me and example how to do it? Because I tried like that and couldn't
Something like..
Copy code
roles.forEach(r => IAMMember(`prod-sa-runner-${r}`, {
  role: r,
For the resource name, you'll need to slugify the role being passed in to avoid special characters like ':' and '/'
Got it, I'll try. Thanks