Is there a way of querying Google Secrets Manager?

691 Views Asked by At

Google Secret Manager supports setting labels. The UI supports filtering by name or label. However, I can't find a way of searching secrets in any sane way other than scanning them all. Am I missing something?

link to REST API: https://cloud.google.com/secret-manager/docs/reference/rest/v1/projects.secrets/list

1

There are 1 best solutions below

0
On

There is a query filter language you can use with the Google Secret Manager Rest API. It took a while to track this down, but the filter language is documented here.

https://cloud.google.com/secret-manager/docs/filtering

With this you can pass a url parameter filter=somecondition - for example

?labels.environment=production