Fix net vpc firewall module schema (#3099)

* fix ports in net vpc firewall module schema

* default ports to []
This commit is contained in:
Ludovico Magnocavallo
2025-05-20 10:59:34 +02:00
committed by GitHub
parent 2e3335630a
commit 2a5e5833a9
2 changed files with 7 additions and 3 deletions

View File

@@ -154,7 +154,7 @@ resource "google_compute_firewall" "custom-rules" {
iterator = rule
content {
protocol = rule.value.protocol
ports = rule.value.ports
ports = try(rule.value.ports, [])
}
}
@@ -163,7 +163,7 @@ resource "google_compute_firewall" "custom-rules" {
iterator = rule
content {
protocol = rule.value.protocol
ports = rule.value.ports
ports = try(rule.value.ports, [])
}
}
}

View File

@@ -88,7 +88,11 @@
"ports": {
"type": "array",
"items": {
"type": "number"
"type": [
"integer",
"string"
],
"pattern": "^[0-9]+(?:-[0-9]+)?$"
}
}
}