I want to run a bash script located on a VM instance from Google cloud function. Is there something that compute engine client library provide? I have been searching for solution but so far found that only start/stop can be triggered from cloud function.
Asked
Active
Viewed 486 times
-2
-
Does this answer your question? https://stackoverflow.com/questions/59196113/google-functions-execute-bash-script-on-instance – Alex G Apr 26 '21 at 14:37
-
@AlexG Thank you for your response. I looked at it before posting here. That question was asked about a year and a half ago and I was wondering if anything had changed since then. – user2896215 Apr 27 '21 at 05:50
1 Answers
1
I would suggest you go for Google's Cloud Run. Just like Cloud Functions, Cloud Run is serverless (you don't provision any servers and it scales to zero) but the distinction is that what is executed is a docker container.
Within that container, your "code" is executed in the container environment when called. Since it is running in a container, you can run bash script and providing any scripts or other environment needed to be able to run.

Priyashree Bhadra
- 158
- 7