PHACDataHub / infra-core

GCP infrastructure configurations using flux, crossplane and backstage
MIT License
1 stars 1 forks source link

Multiple IAM Bindings #4

Open vedantthapa opened 9 months ago

vedantthapa commented 9 months ago

Currently, crossplane has a one-to-one relationship between role and member fields in a ProjectIAMMember resource. Therefore, multiple ProjectIAMMember resources are required to be specified for each role/member combination. This makes it difficult to map multiple roles/members from a crossplane claim to it's composition.

Here's a related upstream issue: https://github.com/upbound/provider-gcp/issues/14

Currently this is fixed by delegating addition of users to the owner of the project.

Other potential fixes:

vedantthapa commented 9 months ago

I suspect this can also be resolved by using crossplane functions. This one in particular: https://github.com/crossplane-contrib/function-go-templating.

The idea would be template a ProjectIAMMember resource and insert role and member fields at runtime. Similar to how helm would handle this use-case.