'What is the easiest way to make Cloud Function inactive/paused?
I have my cloud function that is triggered by Firestore event. For security reasons I need to manually enable/disable this function several times per day. So every time I have to edit and switch on and off its Firestore trigger event through the cloud functions console.
Is there an easier way to "pause" cloud function?
Solution 1:[1]
There is nothing built into the Cloud Functions platform to pause functions. For demos where I need something like this, I typically store a flag whether the function is enabled in my database (Firestore or Realtime Database) and then read that value as the first operation in my code.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Frank van Puffelen |
