diff --git a/README.md b/README.md index 65ebf4e..e2bff15 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,8 @@ Then perform the following commands on the root folder: | scheduler\_job | An existing Cloud Scheduler job instance | `object({ name = string })` | `null` | no | | time\_zone | The timezone to use in scheduler | `string` | `"Etc/UTC"` | no | | topic\_name | Name of pubsub topic connecting the scheduled job and the function | `string` | `"test-topic"` | no | +| vpc\_connector | The VPC Network Connector that this cloud function can connect to. It should be set up as fully-qualified URI. The format of this field is projects//locations//connectors/\*. | `string` | `null` | no | +| vpc\_connector\_egress\_settings | The egress settings for the connector, controlling what traffic is diverted through it. Allowed values are ALL\_TRAFFIC and PRIVATE\_RANGES\_ONLY. If unset, this field preserves the previously set value. | `string` | `null` | no | ## Outputs diff --git a/main.tf b/main.tf index a8a7306..27a5d47 100644 --- a/main.tf +++ b/main.tf @@ -83,4 +83,6 @@ module "main" { labels = var.function_labels service_account_email = var.function_service_account_email timeout_s = var.function_timeout_s + vpc_connector = var.vpc_connector + vpc_connector_egress_settings = var.vpc_connector_egress_settings } diff --git a/variables.tf b/variables.tf index c7b5162..e00fc6a 100644 --- a/variables.tf +++ b/variables.tf @@ -110,6 +110,18 @@ variable "function_service_account_email" { description = "The service account to run the function as." } +variable "vpc_connector" { + type = string + default = null + description = "The VPC Network Connector that this cloud function can connect to. It should be set up as fully-qualified URI. The format of this field is projects//locations//connectors/*." +} + +variable "vpc_connector_egress_settings" { + type = string + default = null + description = "The egress settings for the connector, controlling what traffic is diverted through it. Allowed values are ALL_TRAFFIC and PRIVATE_RANGES_ONLY. If unset, this field preserves the previously set value." +} + variable "bucket_name" { type = string default = ""