Add support for vpc connector and ingress settings to cloud-function (#116)
* add support for ingress/egress/vpc connector to cloud function * refactor vpc connector support * refactor ingress settings support * fix vpc connector value * fix vpc connector value
This commit is contained in:
committed by
GitHub
parent
cb84c34c5d
commit
3cad63285f
@@ -57,21 +57,29 @@ variable "iam_roles" {
|
||||
variable "function_config" {
|
||||
description = "Cloud function configuration."
|
||||
type = object({
|
||||
entry_point = string
|
||||
instances = number
|
||||
memory = number
|
||||
runtime = string
|
||||
timeout = number
|
||||
entry_point = string
|
||||
ingress_settings = string
|
||||
instances = number
|
||||
memory = number
|
||||
runtime = string
|
||||
timeout = number
|
||||
})
|
||||
default = {
|
||||
entry_point = "main"
|
||||
instances = 1
|
||||
memory = 256
|
||||
runtime = "python37"
|
||||
timeout = 180
|
||||
entry_point = "main"
|
||||
ingress_settings = null
|
||||
instances = 1
|
||||
memory = 256
|
||||
runtime = "python37"
|
||||
timeout = 180
|
||||
}
|
||||
}
|
||||
|
||||
variable "ingress_settings" {
|
||||
description = "Control traffic that reaches the cloud function. Allowed values are ALLOW_ALL and ALLOW_INTERNAL_ONLY."
|
||||
type = string
|
||||
default = null
|
||||
}
|
||||
|
||||
variable "labels" {
|
||||
description = "Resource labels"
|
||||
type = map(string)
|
||||
@@ -121,3 +129,16 @@ variable "trigger_config" {
|
||||
})
|
||||
default = null
|
||||
}
|
||||
|
||||
variable "vpc_connector_config" {
|
||||
description = "VPC connector configuration. Set `create_config` attributes to trigger creation."
|
||||
type = object({
|
||||
egress_settings = string
|
||||
name = string
|
||||
create_config = object({
|
||||
ip_cidr_range = string
|
||||
network = string
|
||||
})
|
||||
})
|
||||
default = null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user