fixed tests

This commit is contained in:
eliamaldini
2023-08-18 15:38:35 +02:00
parent e762e93677
commit 87e82244af
4 changed files with 47 additions and 38 deletions

View File

@@ -48,15 +48,24 @@ variable "name" {
variable "private_connections" {
description = "VMWare private connections configuration. It is used to create the gcloud command printed as output."
type = map(object({
name = string
network_self_link = string
peering_name = string
description = optional(string, "Terraform-managed.")
type = optional(string, "PRIVATE_SERVICE_ACCESS")
routing_mode = optional(string, "REGIONAL")
name = string
network_self_link = string
peering_name = optional(string)
tenant_host_project = optional(string)
description = optional(string, "Terraform-managed.")
type = optional(string, "PRIVATE_SERVICE_ACCESS")
routing_mode = optional(string, "REGIONAL")
}))
default = {}
nullable = false
validation {
condition = alltrue([
for k, v in var.private_connections :
(v.peering_name != null) != (v.tenant_host_project != null)
]
)
error_message = "Both peering_name and tenant_host_project variables have been set. Only one variable is allowed."
}
validation {
condition = alltrue([
for r in var.private_connections :