@@ -129,7 +129,13 @@ jobs:
129
129
All existing secret volume mounts will be removed, even if this parameter is
130
130
not passed.
131
131
132
- - `service_account_email` : (Optional) The email address of the IAM service account associated with the function at runtime.
132
+ - `service_account_email` : (Optional) The email address of the Google Cloud
133
+ service account to use as the runtime service account for the function. If
134
+ unspecified, the default Cloud Functions runtime service account is used.
135
+
136
+ Note this differs from the service account used to deploy the Cloud
137
+ Function, which is the currently-authenticated principal. See
138
+ [Authorization](#Authorization) for more information.
133
139
134
140
- `timeout` : (Optional) The function execution timeout in seconds. Defaults to 60.
135
141
@@ -211,17 +217,23 @@ automatically private services, while deploying a revision of a public
211
217
212
218
# # Authorization
213
219
214
- There are a few ways to authenticate this action. A service account will be needed
215
- with the following roles :
220
+ The _deployment_ service account must have the following IAM permissions :
221
+
222
+ - Cloud Functions Admin (`roles/cloudfunctions.admin`)
223
+
224
+ Additionally, the _deployment_ service account must have permissions to act as
225
+ (impersonate) the _runtime_ service account, which can be achieved by granting
226
+ the deployment _service_ account "roles/iam.serviceAccountUser" permissions on
227
+ the _runtime_ service account. If unspecified, the _runtime_ service account is the App Engine Default Service Account `[email protected] `.
216
228
217
- - Cloud Functions Admin (`cloudfunctions.admin`) :
218
- - Can create, update, and delete functions.
219
- - Can set IAM policies and view source code .
229
+ In some cases, the Cloud Build service account, which defaults as
230
+ ` [email protected] ` , may also need to be granted
231
+ " roles/iam.serviceAccountUser " permission on the _runtime_ service account .
220
232
221
- This service account needs to be a member of the `App Engine default service account`
222
- ` ([email protected] .com) ` , with role
223
- ` Service Account User ` (`roles/iam.serviceAccountUser`). See [additional configuration for deployment](https://cloud.google.com/functions/docs/reference/iam/roles#additional-configuration)
224
- for further instructions.
233
+ See the Google Cloud documentation to [learn more about custom runtime service
234
+ accounts](https://cloud.google .com/functions/docs/securing/function-identity#individual)
235
+ and [additional configuration for
236
+ deployment](https://cloud.google.com/functions/docs/reference/iam/roles#additional-configuration)
225
237
226
238
# ## Via google-github-actions/auth
227
239
0 commit comments