|
17 | 17 | # -- IPV6 Cidr block another will be created to ::/0 in addition to the |
18 | 18 | # -- one with the 0.0.0.0/0 (IPV4) notation. |
19 | 19 |
|
| 20 | +variable rules { |
| 21 | + type = object({ |
| 22 | + http = list(string) |
| 23 | + all-traffic = list(string) |
| 24 | + ecs = list(string) |
| 25 | + docker = list(string) |
| 26 | + java = list(string) |
| 27 | + jenkins = list(string) |
| 28 | + sonar = list(string) |
| 29 | + postgres = list(string) |
| 30 | + }) |
| 31 | +} |
| 32 | + |
| 33 | + |
| 34 | +locals { |
| 35 | + rules = { |
| 36 | + http = [ 80, 80, "tcp", "http plaintext" ] |
| 37 | + all-traffic = [ -1, -1, "-1", "All protocols" ] |
| 38 | + ecs = [ 32768, 61000, "tcp", "cluster comms" ] |
| 39 | + docker = [ 5000, 5000, "tcp", "docker registry" ] |
| 40 | + java = [ 8080, 8080, "tcp", "java port" ] |
| 41 | + jenkins = [ 8080, 8080, "tcp", "jenkins ci" ] |
| 42 | + sonar = [ 9000, 9000, "tcp", "sonarqube metrics" ] |
| 43 | + postgres = [ 5432, 5432, "tcp", "postgresql db" ] |
| 44 | + } |
| 45 | +} |
| 46 | + |
| 47 | + |
| 48 | +/* |
20 | 49 | variable rules { |
21 | 50 |
|
22 | 51 | description = "Modular rules allowing either TCP or UDP traffic." |
23 | 52 | type = any |
24 | 53 |
|
25 | | - default { |
| 54 | + default = { |
26 | 55 |
|
27 | 56 | # < ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~ > |
28 | 57 | # < ~~~ the most common traffic types ~~~ > |
@@ -111,3 +140,4 @@ variable rules { |
111 | 140 | } |
112 | 141 |
|
113 | 142 | } |
| 143 | +*/ |
0 commit comments