Skip to content

Commit 366f8da

Browse files
authored
Merge pull request #2 from terraform-google-modules/feature/specify-function-service-account
Allow the service account a function runs as to be specified
2 parents 38afb0e + 8cd2495 commit 366f8da

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

‎CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ The format is based on [Keep a Changelog][keepachangelog-site],
66
and this project adheres to [Semantic Versioning][semver-site].
77

88

9+
## Unreleased
10+
11+
### Added
12+
13+
- Ability to specify a service account for functions to run as
14+
915
## 0.1.0 - 2018-08-08
1016

1117
### Added

‎main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ resource "google_cloudfunctions_function" "main" {
6666
environment_variables = "${var.function_environment_variables}"
6767
project = "${var.project_id}"
6868
region = "${var.region}"
69+
service_account_email = "${var.function_service_account_email}"
6970
}
7071

7172
data "archive_file" "main" {

‎variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,12 @@ variable "function_timeout_s" {
9393
description = "The amount of time in seconds allotted for the execution of the function."
9494
}
9595

96+
variable "function_service_account_email" {
97+
type = "string"
98+
default = ""
99+
description = "The service account to run the function as."
100+
}
101+
96102
variable "bucket_name" {
97103
type = "string"
98104
default = ""

0 commit comments

Comments
 (0)