serverless-google-cloudfunctions
serverless-google-cloudfunctions copied to clipboard
Service Account Configuration
When deploying GCP cloud functions, serverless framework always uses the default AppEngine service account. If I delete that default account and deploy, then I get this error message:
{
"ResourceType":"cloudfunctions.v1beta2.function",
"ResourceErrorCode":"400",
"ResourceErrorMessage":{
"code":400,
"message":"Default service account '<project_id>@appspot.gserviceaccount.com' doesn't exist. Please recreate this account (for example by disabling and enabling the Cloud Functions API), or specify a different account.",
"status":"FAILED_PRECONDITION",
"details":[
],
"statusMessage":"Bad Request",
"requestPath":"https://cloudfunctions.googleapis.com/v1beta2/projects/<project_id>/locations/asia-east2/functions",
"httpMethod":"POST"
}
}
Is there a way for developers to specify which service account to use, as the flag --service-account=xxx@xxx in gcloud command?
If not, I think this should be a nice feature to add. Also, when will the resource type upgrade to v1?
same issue. Here is how to set service account using gcloud sdk.
gcloud functions deploy --service-account=xxx@xxx
Does serverless framework or this plugin support set --service-account?
https://cloud.google.com/sdk/gcloud/reference/alpha/functions/deploy#--service-account