Skip to content

Commit

Permalink
feat: add build service account argument (#130)
Browse files Browse the repository at this point in the history
  • Loading branch information
caetano-colin authored Jun 26, 2024
1 parent 8e86d39 commit d17cfa7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Functional examples are included in the
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| build\_env\_variables | User-provided build-time environment variables | `map(string)` | `null` | no |
| 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 |
| description | Short description of the function | `string` | `null` | no |
| docker\_repository | User managed repository created in Artifact Registry optionally with a customer managed encryption key. | `string` | `null` | no |
| 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 |
Expand Down
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ resource "google_cloudfunctions2_function" "function" {
runtime = var.runtime
entry_point = var.entrypoint
environment_variables = var.build_env_variables
service_account = var.build_service_account

source {
dynamic "storage_source" {
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -155,3 +155,9 @@ variable "members" {
error_message = "The supported keys are invokers and developers."
}
}

variable "build_service_account" {
type = string
description = "Cloud Function Build Service Account Id. This is The fully-qualified name of the service account to be used for building the container."
default = null
}

0 comments on commit d17cfa7

Please sign in to comment.