Skip to content

Commit 114ccff

Browse files
authored
doc(instance): security group: remove deprecated ip from examples (#3260)
1 parent 74b61f5 commit 114ccff

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

docs/resources/instance_security_group.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ resource "scaleway_instance_security_group" "web" {
2121
inbound_rule {
2222
action = "accept"
2323
port = 22
24-
ip = "212.47.225.64"
24+
ip_range = "212.47.225.64/32"
2525
}
2626
2727
inbound_rule {
@@ -46,13 +46,13 @@ resource "scaleway_instance_security_group" "web" {
4646
4747
inbound_rule {
4848
action = "drop"
49-
ip = "1.1.1.1" # Banned IP
49+
ip_range = "1.1.1.1/32" # Banned IP range
5050
}
5151
5252
inbound_rule {
5353
action = "accept"
5454
port = 22
55-
ip = "212.47.225.64"
55+
ip_range = "212.47.225.64/32"
5656
}
5757
5858
inbound_rule {
@@ -62,7 +62,7 @@ resource "scaleway_instance_security_group" "web" {
6262
6363
outbound_rule {
6464
action = "accept"
65-
ip = "8.8.8.8" # Only allow outgoing connection to this IP.
65+
ip_range = "8.8.8.8/32" # Only allow outgoing connection to this IP range.
6666
}
6767
}
6868
```
@@ -86,7 +86,7 @@ resource "scaleway_instance_security_group" "dummy" {
8686
content {
8787
action = "accept"
8888
port = 22
89-
ip = inbound_rule.value
89+
ip_range = inbound_rule.value
9090
}
9191
}
9292
}
@@ -132,7 +132,7 @@ The `inbound_rule` and `outbound_rule` block supports:
132132
If no `port` nor `port_range` are specified, rule will apply to all port.
133133
Only one of `port` and `port_range` should be specified.
134134

135-
- `ip`- (Optional) The ip this rule apply to. If no `ip` nor `ip_range` are specified, rule will apply to all ip. Only one of `ip` and `ip_range` should be specified.
135+
- `ip`- (Deprecated) The ip this rule apply to. If no `ip` nor `ip_range` are specified, rule will apply to all ip. Only one of `ip` and `ip_range` should be specified.
136136

137137
- `ip_range`- (Optional) The ip range (e.g `192.168.1.0/24`) this rule applies to. If no `ip` nor `ip_range` are specified, rule will apply to all ip. Only one of `ip` and `ip_range` should be specified.
138138

docs/resources/instance_security_group_rules.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ resource "scaleway_instance_security_group" "main" {
4646
4747
locals {
4848
trusted = [
49-
"1.2.3.4",
50-
"4.5.6.7",
51-
"7.8.9.10"
49+
"1.2.3.4/32",
50+
"4.5.6.7/32",
51+
"7.8.9.10/24"
5252
]
5353
}
5454
@@ -59,7 +59,7 @@ resource "scaleway_instance_security_group_rules" "main" {
5959
for_each = local.trusted
6060
content {
6161
action = "accept"
62-
ip = inbound_rule.value
62+
ip_range = inbound_rule.value
6363
port = 80
6464
}
6565
}
@@ -79,9 +79,9 @@ resource "scaleway_instance_security_group" "main" {
7979
8080
locals {
8181
trusted = [
82-
{ ip = "1.2.3.4", port = "80" },
83-
{ ip = "5.6.7.8", port = "81" },
84-
{ ip = "9.10.11.12", port = "81" },
82+
{ ip_range = "1.2.3.4/32", port = "80" },
83+
{ ip_range = "5.6.7.8/32", port = "81" },
84+
{ ip_range = "9.10.11.12/32", port = "81" },
8585
]
8686
}
8787
@@ -92,7 +92,7 @@ resource "scaleway_instance_security_group_rules" "main" {
9292
for_each = local.trusted
9393
content {
9494
action = "accept"
95-
ip = inbound_rule.value.ip
95+
ip_range = inbound_rule.value.ip_range
9696
port = inbound_rule.value.port
9797
}
9898
}
@@ -122,7 +122,7 @@ The `inbound_rule` and `outbound_rule` block supports:
122122
If no `port` nor `port_range` are specified, rule will apply to all port.
123123
Only one of `port` and `port_range` should be specified.
124124

125-
- `ip`- (Optional) The ip this rule apply to. If no `ip` nor `ip_range` are specified, rule will apply to all ip. Only one of `ip` and `ip_range` should be specified.
125+
- `ip`- (Deprecated) The ip this rule apply to. If no `ip` nor `ip_range` are specified, rule will apply to all ip. Only one of `ip` and `ip_range` should be specified.
126126

127127
- `ip_range`- (Optional) The ip range (e.g `192.168.1.0/24`) this rule applies to. If no `ip` nor `ip_range` are specified, rule will apply to all ip. Only one of `ip` and `ip_range` should be specified.
128128

0 commit comments

Comments
 (0)