Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Ingress Settings to the Function #43

Merged
merged 4 commits into from
Sep 15, 2020
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: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 | `<list>` | 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

Expand Down
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}