aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/digitalocean/firewall/main.tf
diff options
context:
space:
mode:
Diffstat (limited to 'digitalocean/firewall/main.tf')
-rw-r--r--digitalocean/firewall/main.tf10
1 files changed, 10 insertions, 0 deletions
diff --git a/digitalocean/firewall/main.tf b/digitalocean/firewall/main.tf
index 937a76a..b0a435a 100644
--- a/digitalocean/firewall/main.tf
+++ b/digitalocean/firewall/main.tf
@@ -21,6 +21,16 @@ resource "digitalocean_firewall" "this" {
}
}
+ dynamic "inbound_rule" {
+ for_each = var.open_ports
+
+ content {
+ protocol = "udp"
+ port_range = inbound_rule.value
+ source_addresses = ["0.0.0.0/0", "::/0"]
+ }
+ }
+
outbound_rule {
protocol = "tcp"
port_range = "1-65535"