diff --git a/README.md b/README.md index 27ad250..819448e 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,8 @@ module "localhost_function" { | source\_dependent\_files | A list of any Terraform created `local_file`s that the module will wait for before creating the archive. | object | `` | no | | source\_directory | The pathname of the directory 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 | +| ingress\_settings | The ingress settings for the function | string | `"ALLOW_ALL"` | no | + ## Outputs diff --git a/main.tf b/main.tf index 39c78de..d733d75 100644 --- a/main.tf +++ b/main.tf @@ -73,6 +73,7 @@ resource "google_cloudfunctions_function" "main" { available_memory_mb = var.available_memory_mb timeout = var.timeout_s entry_point = var.entry_point + ingress_settings = var.ingress_settings event_trigger { event_type = var.event_trigger["event_type"] diff --git a/variables.tf b/variables.tf index 68d4462..9871278 100644 --- a/variables.tf +++ b/variables.tf @@ -123,3 +123,9 @@ variable "event_trigger_failure_policy_retry" { default = false description = "A toggle to determine if the function should be retried on failure." } + +variable "ingress_settings" { + type = string + default = "ALLOW_ALL" + description = "Ingress settings for the Cloud Function" +}