Added min_instances, max_instances, min_throughput and max_throughtpu… (#2706)
* Added min_instances, max_instances, min_throughput and max_throughtput to connector configuration * refactor interface, also implement in v1 module * fix blueprint --------- Co-authored-by: Ludo <ludomagno@google.com>
This commit is contained in:
@@ -222,6 +222,22 @@ variable "vpc_connector_config" {
|
||||
type = object({
|
||||
ip_cidr_range = string
|
||||
network = string
|
||||
instances = optional(object({
|
||||
max = optional(number)
|
||||
min = optional(number, 2)
|
||||
}))
|
||||
throughput = optional(object({
|
||||
max = optional(number, 300)
|
||||
min = optional(number, 200)
|
||||
}))
|
||||
})
|
||||
default = null
|
||||
validation {
|
||||
condition = (
|
||||
var.vpc_connector_config == null ||
|
||||
try(var.vpc_connector_config.instances, null) != null ||
|
||||
try(var.vpc_connector_config.throughput, null) != null
|
||||
)
|
||||
error_message = "VPC connector must specify either instances or throughput."
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user