-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathsecurity_lists.tf
62 lines (49 loc) · 1.33 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
56
57
58
59
60
61
## Copyright (c) 2020, Oracle and/or its affiliates.
## All rights reserved. The Universal Permissive License (UPL), Version 1.0 as shown at http://oss.oracle.com/licenses/upl
locals {
tcp_protocol = "6"
all_protocols = "all"
anywhere = "0.0.0.0/0"
}
resource "oci_core_security_list" "redis-securitylist" {
compartment_id = var.compartment_ocid
vcn_id = oci_core_virtual_network.redis-vcn.id
display_name = "${var.redis-prefix}-securitylist"
defined_tags = {"${oci_identity_tag_namespace.ArchitectureCenterTagNamespace.name}.${oci_identity_tag.ArchitectureCenterTag.name}" = var.release }
egress_security_rules {
protocol = local.tcp_protocol
destination = local.anywhere
}
ingress_security_rules {
protocol = local.tcp_protocol
source = local.anywhere
tcp_options {
max = "22"
min = "22"
}
}
ingress_security_rules {
protocol = local.tcp_protocol
source = local.anywhere
tcp_options {
max = "6379"
min = "6379"
}
}
ingress_security_rules {
protocol = local.tcp_protocol
source = local.anywhere
tcp_options {
max = "16379"
min = "16379"
}
}
ingress_security_rules {
protocol = local.tcp_protocol
source = var.VCN-CIDR
tcp_options {
max = "26379"
min = "26379"
}
}
}