Skip to content

Commit

Permalink
Merge pull request #2 from weka/feat/add-security-rules-for-public-lb
Browse files Browse the repository at this point in the history
feat: add security list rules for public lb
  • Loading branch information
Tarasovych authored Nov 6, 2024
2 parents 98b246f + 74c2617 commit e89dc0b
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion modules/network/subnets.tf
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,25 @@ resource "oci_core_security_list" "oke" {
lifecycle {
ignore_changes = [
freeform_tags, defined_tags, display_name, vcn_id,
ingress_security_rules, egress_security_rules, # ignore for CCM-management
egress_security_rules, # ignore for CCM-management
]
}

dynamic "ingress_security_rules" {
iterator = port
for_each = each.key == "pub_lb" ? ["443", "80"] : []
content {
protocol = "6"
source = "0.0.0.0/0"
source_type = "CIDR_BLOCK"
tcp_options {
source_port_range {
max = port.value
min = port.value
}
}
}
}
}

# Return configured/created subnet IDs and CIDRs when applicable
Expand Down

0 comments on commit e89dc0b

Please sign in to comment.