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:
apichick
2024-11-21 09:05:12 +01:00
committed by GitHub
parent 904cf5a1c3
commit 587edfd8d5
7 changed files with 55 additions and 14 deletions

View File

@@ -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."
}
}