Niccolò Caselli
Niccolò Caselli

Reputation: 882

Global variables in MongoDB Atlas triggers functions

Is it possible to share global variables among all the functions of MongoDB Atlas triggers in order to save API keys and passwords?

Searching the net I found no answers, but I think it is a necessary feature.

Upvotes: 1

Views: 805

Answers (1)

Gobind Deep Singh
Gobind Deep Singh

Reputation: 527

So this might help:

MongoDB Triggers are Realm Functions created under a Realm App created under the name "Triggers_RealmApp". Given that fact you can go into the Realm App and then you can use realm secrets which can be configured, and you can access them in every realm function (which are all your triggers essentially).

Ref - https://docs.mongodb.com/realm/values-and-secrets/

Upvotes: 1

Related Questions