walzer91
walzer91

Reputation: 630

Google Cloud Secret Manager - Notifications on PubSub

I'm trying to configure Google Secret Manager in order to get notifications on PubSub (following this guide).

Is it possible to configure notifications on service level and not only on secret level?

I want to receive notifications on every secret of the project, without the need to explicitly to link a secret to the topic.

Thanks everyone!

Upvotes: 0

Views: 387

Answers (2)

Aniket Sonawane
Aniket Sonawane

Reputation: 1

We can setup a notifications without creating a secret with particular topics. We can make use of audit logs by creating a logs routing sink. console.cloud.google.com/logs/router/, create a log routing sink with sink name, description and destination - (where your destination will be "cloud pub/sub topic"). In this way, notifications will be received upon any secret updates.

Upvotes: 0

guillaume blaquiere
guillaume blaquiere

Reputation: 75775

It's not possible to configure a secret update notification at service level. Only the secret level is allowed.

However, in that case, I recommend to script the creation, or to use IaC solution, such as terraform, to automate the creation and the addition of the new secret notification to the existing topic.

To prevent manual creation, you can also remove the role to the users to force them to use your automated creation procedure.

Upvotes: 1

Related Questions