Skip to content

Commit 54ad802

Browse files
author
Aaron Lane
committed
Add function_timeout_s variable to project_cleanup
1 parent e5758ef commit 54ad802

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning][semver-site].
77

88
## [Unreleased]
99

10+
### Added
11+
12+
- The `function_timeout_s` variable is exposed on the `project_cleanup` submodule.
13+
1014
## [1.1.1] - 2019-11-13
1115

1216
### Fixed

modules/project_cleanup/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ module "scheduled_project_cleaner" {
4646
function_description = "Clean up GCP projects older than ${var.max_project_age_in_hours} hours matching particular tags"
4747
function_runtime = "go111"
4848
function_service_account_email = google_service_account.project_cleaner_function.email
49+
function_timeout_s = var.function_timeout_s
4950

5051
function_environment_variables = {
5152
TARGET_EXCLUDED_LABELS = jsonencode(var.target_excluded_labels)

modules/project_cleanup/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414
* limitations under the License.
1515
*/
1616

17+
variable "function_timeout_s" {
18+
type = number
19+
default = 60
20+
description = "The amount of time in seconds allotted for the execution of the function."
21+
}
22+
1723
variable "organization_id" {
1824
type = string
1925
description = "The organization ID whose projects to clean up"

0 commit comments

Comments
 (0)