diff --git a/README.md b/README.md index 6778f988..6b7372aa 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,7 @@ Then perform the following commands on the root folder: | function\_source\_directory | The contents of this directory will be archived and used as the function source. | `string` | n/a | yes | | function\_timeout\_s | The amount of time in seconds allotted for the execution of the function. | `number` | `60` | no | | grant\_token\_creator | Specify true if you want to add token creator role to the default Pub/Sub SA | `bool` | `false` | no | +| ingress\_settings | The ingress settings for the function. Allowed values are ALLOW\_ALL, ALLOW\_INTERNAL\_AND\_GCLB and ALLOW\_INTERNAL\_ONLY. Changes to this field will recreate the cloud function. | `string` | `null` | no | | job\_description | Addition text to describe the job | `string` | `""` | no | | job\_name | The name of the scheduled job to run | `string` | `null` | no | | job\_schedule | The job frequency, in cron syntax | `string` | `"*/2 * * * *"` | no | diff --git a/main.tf b/main.tf index 340b2df6..56a8a856 100644 --- a/main.tf +++ b/main.tf @@ -86,6 +86,7 @@ module "main" { service_account_email = var.function_service_account_email timeout_s = var.function_timeout_s max_instances = var.function_max_instances + ingress_settings = var.ingress_settings vpc_connector = var.vpc_connector vpc_connector_egress_settings = var.vpc_connector_egress_settings } diff --git a/variables.tf b/variables.tf index 4ff6b193..6edc03a8 100644 --- a/variables.tf +++ b/variables.tf @@ -122,6 +122,12 @@ variable "function_max_instances" { description = "The maximum number of parallel executions of the function." } +variable "ingress_settings" { + type = string + default = null + description = "The ingress settings for the function. Allowed values are ALLOW_ALL, ALLOW_INTERNAL_AND_GCLB and ALLOW_INTERNAL_ONLY. Changes to this field will recreate the cloud function." +} + variable "vpc_connector" { type = string default = null