-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathsecurity_lists.tf
55 lines (48 loc) · 1.34 KB
/
security_lists.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
resource "oci_core_security_list" "CCCSecurityList1" {
compartment_id = oci_identity_compartment.CCCCompartment.id
display_name = "CCCSecurityList"
vcn_id = oci_core_virtual_network.CCCVCN.id
egress_security_rules {
protocol = "6"
destination = "0.0.0.0/0"
}
dynamic "ingress_security_rules" {
for_each = var.service_ports
content {
protocol = "6"
source = "0.0.0.0/0"
tcp_options {
max = ingress_security_rules.value
min = ingress_security_rules.value
}
}
}
ingress_security_rules {
protocol = "6"
source = var.VCN-CIDRs[0]
}
}
resource "oci_core_security_list" "CCCSecurityList2" {
compartment_id = oci_identity_compartment.CCCCompartment.id
display_name = "CCCSecurityList"
vcn_id = oci_core_virtual_network.CCCVCN.id
egress_security_rules {
protocol = "6"
destination = "0.0.0.0/0"
}
dynamic "ingress_security_rules" {
for_each = var.service_ports
content {
protocol = "6"
source = "0.0.0.0/0"
tcp_options {
max = ingress_security_rules.value
min = ingress_security_rules.value
}
}
}
ingress_security_rules {
protocol = "6"
source = var.VCN-CIDRs[1]
}
}