Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/int.cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ steps:
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && source_test_env && init_credentials && cd test/integration && RUN_STAGE=init go test -v ./... -p 1']
- id: converge
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && source_test_env && init_credentials && cd test/integration && RUN_STAGE=apply go test -v ./... -p 1']
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && source_test_env && init_credentials && cd test/integration && RUN_STAGE=apply go test -v ./... -timeout 0 -p 1']
- id: verify
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && source_test_env && init_credentials && cd test/integration && RUN_STAGE=verify go test -v ./... -p 1']
Expand Down
1 change: 1 addition & 0 deletions modules/repository-function/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ is a tested reference of how to use this submodule with the
| project\_id | The ID of the project to which resources will be applied. | `string` | n/a | yes |
| region | The region in which resources will be applied. | `string` | n/a | yes |
| runtime | The runtime in which the function will be executed. | `string` | `"nodejs6"` | no |
| service\_account\_email | The service account to run the function as. | `string` | `""` | no |
| source\_repository\_url | The URL of the repository which contains the function source code. | `string` | n/a | yes |
| timeout\_s | The amount of time in seconds allotted for the execution of the function. | `number` | `60` | no |
| vpc\_connector | The VPC Network Connector that this cloud function can connect to. It should be set up as fully-qualified URI. The format of this field is projects/\*/locations/\*/connectors/\*. | `string` | `null` | no |
Expand Down
5 changes: 3 additions & 2 deletions modules/repository-function/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ resource "google_cloudfunctions_function" "main" {
url = var.source_repository_url
}

project = var.project_id
region = var.region
project = var.project_id
region = var.region
service_account_email = var.service_account_email
}
6 changes: 6 additions & 0 deletions modules/repository-function/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ variable "timeout_s" {
description = "The amount of time in seconds allotted for the execution of the function."
}

variable "service_account_email" {
type = string
default = ""
description = "The service account to run the function as."
}

variable "ingress_settings" {
type = string
default = "ALLOW_ALL"
Expand Down