From b0b173850b36079180fd8ac752e69ac96e2d7787 Mon Sep 17 00:00:00 2001 From: Andrei Ilas Date: Tue, 6 Aug 2024 22:26:23 +0300 Subject: [PATCH] add support for stateless rules --- modules/network/rules.tf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/network/rules.tf b/modules/network/rules.tf index 1b88d633..fdf2c8b9 100644 --- a/modules/network/rules.tf +++ b/modules/network/rules.tf @@ -20,6 +20,7 @@ locals { { for k, v in local.fss_rules : k => merge(v, { "nsg_id" = local.fss_nsg_id }) }, ) : x => merge(y, { description = x + stateless = lookup(y, "stateless", false) network_security_group_id = lookup(y, "nsg_id") direction = contains(keys(y), "source") ? "INGRESS" : "EGRESS" protocol = lookup(y, "protocol") @@ -44,7 +45,7 @@ locals { resource "oci_core_network_security_group_security_rule" "oke" { for_each = local.all_rules - stateless = false + stateless = each.value.stateless description = each.value.description destination = each.value.destination destination_type = each.value.destination_type