Add support using custom SA for 2nd gen cloud functions deployment
Currently using 2nd gen cloud functions requires having the default Compute Engine Service Account and there is no way to use custom service account.
Not all projects have the service account or have any means to re-create the default SA if it has been deleted at some point and using default service accounts is anyway something that is not recommended by Google. So currently not all can move to using 2nd gen cloud functions unless support for using custom SA is added.
-
Thomas Bouldin commented
As of the latest CLI version, the service account you use for your function is the service account that is used in the connecting services (e.g. Google Eventarc and Google Cloud Tasks). Hopefully that unblocks you!