Skip to content

Commit c411f35

Browse files
authored
fix: Stricter defaults (#2)
* docs: Example with secure source IP addresses * fix: Remove empty rule set as default when not user-specified
1 parent 7e72760 commit c411f35

File tree

2 files changed

+13
-14
lines changed

2 files changed

+13
-14
lines changed

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,55 +44,55 @@ module "ipa_security_group" {
4444
protocol = "tcp"
4545
port_range_min = 80
4646
port_range_max = 80
47-
remote_ip_prefix = "0.0.0.0/0"
47+
remote_ip_prefix = "10.0.0.0/0"
4848
},
4949
{
5050
direction = "ingress"
5151
ether_type = "IPv4"
5252
protocol = "udp"
5353
port_range_min = 123
5454
port_range_max = 123
55-
remote_ip_prefix = "0.0.0.0/0"
55+
remote_ip_prefix = "10.0.0.0/0"
5656
},
5757
{
5858
direction = "ingress"
5959
ether_type = "IPv4"
6060
protocol = "tcp"
6161
port_range_min = 88
6262
port_range_max = 88
63-
remote_ip_prefix = "0.0.0.0/0"
63+
remote_ip_prefix = "10.0.0.0/0"
6464
},
6565
{
6666
direction = "ingress"
6767
ether_type = "IPv4"
6868
protocol = "udp"
6969
port_range_min = 88
7070
port_range_max = 88
71-
remote_ip_prefix = "0.0.0.0/0"
71+
remote_ip_prefix = "10.0.0.0/0"
7272
},
7373
{
7474
direction = "ingress"
7575
ether_type = "IPv4"
7676
protocol = "tcp"
7777
port_range_min = 53
7878
port_range_max = 53
79-
remote_ip_prefix = "0.0.0.0/0"
79+
remote_ip_prefix = "10.0.0.0/0"
8080
},
8181
{
8282
direction = "ingress"
8383
ether_type = "IPv4"
8484
protocol = "udp"
8585
port_range_min = 53
8686
port_range_max = 53
87-
remote_ip_prefix = "0.0.0.0/0"
87+
remote_ip_prefix = "10.0.0.0/0"
8888
},
8989
{
9090
direction = "ingress"
9191
ether_type = "IPv4"
9292
protocol = "tcp"
9393
port_range_min = 389
9494
port_range_max = 389
95-
remote_ip_prefix = "0.0.0.0/0"
95+
remote_ip_prefix = "10.0.0.0/0"
9696
},
9797
{
9898
direction = "ingress"
@@ -108,31 +108,31 @@ module "ipa_security_group" {
108108
protocol = "tcp"
109109
port_range_min = 636
110110
port_range_max = 636
111-
remote_ip_prefix = "0.0.0.0/0"
111+
remote_ip_prefix = "10.0.0.0/0"
112112
},
113113
{
114114
direction = "ingress"
115115
ether_type = "IPv4"
116116
protocol = "tcp"
117117
port_range_min = 464
118118
port_range_max = 464
119-
remote_ip_prefix = "0.0.0.0/0"
119+
remote_ip_prefix = "10.0.0.0/0"
120120
},
121121
{
122122
direction = "ingress"
123123
ether_type = "IPv4"
124124
protocol = "udp"
125125
port_range_min = 464
126126
port_range_max = 464
127-
remote_ip_prefix = "0.0.0.0/0"
127+
remote_ip_prefix = "10.0.0.0/0"
128128
},
129129
{
130130
direction = "ingress"
131131
ether_type = "IPv4"
132132
protocol = "tcp"
133133
port_range_min = 443
134134
port_range_max = 443
135-
remote_ip_prefix = "0.0.0.0/0"
135+
remote_ip_prefix = "10.0.0.0/0"
136136
}
137137
]
138138
@@ -150,7 +150,7 @@ module "ipa_security_group" {
150150
|------|-------------|------|---------|:--------:|
151151
| `security_group_name` | Name of the security group. Example: `ipa` | `string` | n/a | yes |
152152
| `security_group_description` | Description of the security group | `string` | n/a | no |
153-
| `security_group_rules` | List of security group rules | `list(object({direction = string, ether_type = string, protocol = string, port_range_min = number, port_range_max = number, remote_ip_prefix = string}))` | `[]` | no |
153+
| `security_group_rules` | List of security group rules | `list(object({direction = string, ether_type = string, protocol = string, port_range_min = number, port_range_max = number, remote_ip_prefix = string}))` | n/a | yes |
154154
| `tags` | Map of tags to assign to the security group | `map(string)` | `{}` | no |
155155

156156
### Security Group Rules Input Structure
@@ -162,7 +162,7 @@ Each rule in the `security_group_rules` list is an object with the following att
162162
- `protocol`: The protocol (e.g., `tcp`, `udp`, `icmp`, or `null` for any).
163163
- `port_range_min`: The minimum port number (1-65535, or `null` for protocols like `icmp`).
164164
- `port_range_max`: The maximum port number (1-65535, or `null` for protocols like `icmp`).
165-
- `remote_ip_prefix`: The remote IP prefix in CIDR notation (e.g., `0.0.0.0/0`).
165+
- `remote_ip_prefix`: The remote IP prefix in CIDR notation (e.g., `10.0.0.0/0`).
166166

167167
## SW Bill of Materials (SBoM)
168168
Third-party components used in the working environment.

variables.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ variable "security_group_rules" {
2323
port_range_max = number
2424
remote_ip_prefix = string
2525
}))
26-
default = []
2726
}
2827

2928
variable "tags" {

0 commit comments

Comments
 (0)