diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2023-08-04 14:31:08 +0200 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2023-08-04 14:31:08 +0200 |
commit | 0e87875de0f5bbbade1ad3515c72abaadbe46204 (patch) | |
tree | 26d141bd7968f7f34091cf245ae1f11d6d3b2ee8 /yandex/firewall/main.tf | |
parent | import some common modules (diff) | |
download | infra-terraform-0e87875de0f5bbbade1ad3515c72abaadbe46204.tar.gz infra-terraform-0e87875de0f5bbbade1ad3515c72abaadbe46204.zip |
import a couple of Yandex Cloud moduelsv0.0.2
Diffstat (limited to '')
-rw-r--r-- | yandex/firewall/main.tf | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/yandex/firewall/main.tf b/yandex/firewall/main.tf new file mode 100644 index 0000000..81dc26a --- /dev/null +++ b/yandex/firewall/main.tf @@ -0,0 +1,25 @@ +resource "yandex_vpc_security_group" "this" { + network_id = var.vpc_id + + name = var.name + + ingress { + protocol = "ICMP" + v4_cidr_blocks = ["0.0.0.0/0"] + } + + dynamic "ingress" { + for_each = var.open_ports + + content { + protocol = "ANY" + v4_cidr_blocks = ["0.0.0.0/0"] + port = ingress.value + } + } + + egress { + protocol = "ANY" + v4_cidr_blocks = ["0.0.0.0/0"] + } +} |