Skip to content

Commit 6ae35e2

Browse files
committed
use new event function version
1 parent 105da6e commit 6ae35e2

File tree

4 files changed

+18
-4
lines changed

4 files changed

+18
-4
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ Then perform the following commands on the root folder:
5050
| function\_runtime | The runtime in which the function will be executed. | string | `"nodejs6"` | no |
5151
| function\_service\_account\_email | The service account to run the function as. | string | `""` | no |
5252
| function\_source\_archive\_bucket\_labels | A set of key/value label pairs to assign to the function source archive bucket. | map(string) | `<map>` | no |
53+
| function\_source\_dependent\_files | A list of any terraform created `local_file`s that the module will wait for before creating the archive. | object | `<list>` | no |
5354
| function\_source\_directory | The contents of this directory will be archived and used as the function source. | string | n/a | yes |
5455
| function\_timeout\_s | The amount of time in seconds allotted for the execution of the function. | number | `"60"` | no |
5556
| job\_description | Addition text to describet the job | string | `""` | no |

main.tf

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,10 @@ module "pubsub_topic" {
4848
*****************************************/
4949

5050
module "main" {
51-
source = "terraform-google-modules/event-function/google"
52-
version = "~> 1.1"
51+
# TODO update version once event-function is released with new functionality
52+
source = "github.com/taylorludwig/terraform-google-event-function?ref=feature%2F37-terraform-created-files-in-archive"
53+
# source = "terraform-google-modules/event-function/google"
54+
# version = "~> 1.1"
5355

5456
entry_point = var.function_entry_point
5557
event_trigger = {
@@ -62,6 +64,8 @@ module "main" {
6264
runtime = var.function_runtime
6365
source_directory = var.function_source_directory
6466

67+
source_dependent_files = var.function_source_dependent_files
68+
6569
available_memory_mb = var.function_available_memory_mb
6670
bucket_force_destroy = var.bucket_force_destroy
6771
bucket_labels = var.function_source_archive_bucket_labels

test/setup/versions.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ terraform {
1919
}
2020

2121
provider "google" {
22-
version = "~> 2.13.0"
22+
version = "~> 2.12.0"
2323
}
2424

2525
provider "google-beta" {
26-
version = "~> 2.13.0"
26+
version = "~> 2.12.0"
2727
}

variables.tf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,15 @@ variable "function_source_directory" {
8888
description = "The contents of this directory will be archived and used as the function source."
8989
}
9090

91+
variable "function_source_dependent_files" {
92+
type = list(object({
93+
filename = string
94+
id = string
95+
}))
96+
description = "A list of any terraform created `local_file`s that the module will wait for before creating the archive."
97+
default = []
98+
}
99+
91100
variable "function_timeout_s" {
92101
type = number
93102
default = 60

0 commit comments

Comments
 (0)