How to grant access for a single user to a multiple secrets given the fact the all have the same labels and starts with the same prefix?
I’m currently working on a cross-cloud project that will allow to create similar infras on different cloud providers. It is pretty clear why we have chosen Terraform to implement our solution. We already have an infra working on AWS, however migration to GCP was not smooth. We found out that there is no analogue of AWS SSM solution. After internal discussions we decided to use GCP Secrets Manager as a KV store. I know that this is not a primary usage for this, but it perfectly suits our needs.
I’ve been working with Terraform for a while and have an experience with GCP, but it’s been a while since I used it last time. Maybe my issue is pretty easy to solve, but I’ve stuck on it and can’t move forward. I’m kinda exhausted trying to figure out how everything works, so I would be more than grateful is someone could give me a helping hand on it.
My current project need is to create a set of resources with the same label and grant a VM instance with an option to read all of these (but no other) secrets. I’ve tried to RTFM regarding the secrets manager secret IAM, but the documentation is reaaaally poor. Does anybody here knows what resources should I create to grant access for many secrets to a single user? I’ve tried to create a number of
iam_binding resources, but no luck - I see no attached policies at IAM panel.
Many thanks in advance,