Skip to content

Commit d17cfa7

Browse files
feat: add build service account argument (#130)
1 parent 8e86d39 commit d17cfa7

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ Functional examples are included in the
4646
| Name | Description | Type | Default | Required |
4747
|------|-------------|------|---------|:--------:|
4848
| build\_env\_variables | User-provided build-time environment variables | `map(string)` | `null` | no |
49+
| build\_service\_account | Cloud Function Build Service Account Id. This is The fully-qualified name of the service account to be used for building the container. | `string` | `null` | no |
4950
| description | Short description of the function | `string` | `null` | no |
5051
| docker\_repository | User managed repository created in Artifact Registry optionally with a customer managed encryption key. | `string` | `null` | no |
5152
| entrypoint | The name of the function (as defined in source code) that will be executed. Defaults to the resource name suffix, if not specified | `string` | n/a | yes |

main.tf

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ resource "google_cloudfunctions2_function" "function" {
2828
runtime = var.runtime
2929
entry_point = var.entrypoint
3030
environment_variables = var.build_env_variables
31+
service_account = var.build_service_account
3132

3233
source {
3334
dynamic "storage_source" {

variables.tf

+6
Original file line numberDiff line numberDiff line change
@@ -155,3 +155,9 @@ variable "members" {
155155
error_message = "The supported keys are invokers and developers."
156156
}
157157
}
158+
159+
variable "build_service_account" {
160+
type = string
161+
description = "Cloud Function Build Service Account Id. This is The fully-qualified name of the service account to be used for building the container."
162+
default = null
163+
}

0 commit comments

Comments
 (0)