Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/resources/instance_security_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ resource "scaleway_instance_security_group" "web" {
inbound_rule {
action = "accept"
port = 22
ip = "212.47.225.64"
ip_range = "212.47.225.64/32"
}

inbound_rule {
Expand All @@ -46,13 +46,13 @@ resource "scaleway_instance_security_group" "web" {

inbound_rule {
action = "drop"
ip = "1.1.1.1" # Banned IP
ip_range = "1.1.1.1/32" # Banned IP range
}

inbound_rule {
action = "accept"
port = 22
ip = "212.47.225.64"
ip_range = "212.47.225.64/32"
}

inbound_rule {
Expand All @@ -62,7 +62,7 @@ resource "scaleway_instance_security_group" "web" {

outbound_rule {
action = "accept"
ip = "8.8.8.8" # Only allow outgoing connection to this IP.
ip_range = "8.8.8.8/32" # Only allow outgoing connection to this IP range.
}
}
```
Expand All @@ -86,7 +86,7 @@ resource "scaleway_instance_security_group" "dummy" {
content {
action = "accept"
port = 22
ip = inbound_rule.value
ip_range = inbound_rule.value
}
}
}
Expand Down Expand Up @@ -132,7 +132,7 @@ The `inbound_rule` and `outbound_rule` block supports:
If no `port` nor `port_range` are specified, rule will apply to all port.
Only one of `port` and `port_range` should be specified.

- `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.
- `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.

- `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.

Expand Down
18 changes: 9 additions & 9 deletions docs/resources/instance_security_group_rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ resource "scaleway_instance_security_group" "main" {

locals {
trusted = [
"1.2.3.4",
"4.5.6.7",
"7.8.9.10"
"1.2.3.4/32",
"4.5.6.7/32",
"7.8.9.10/24"
]
}

Expand All @@ -59,7 +59,7 @@ resource "scaleway_instance_security_group_rules" "main" {
for_each = local.trusted
content {
action = "accept"
ip = inbound_rule.value
ip_range = inbound_rule.value
port = 80
}
}
Expand All @@ -79,9 +79,9 @@ resource "scaleway_instance_security_group" "main" {

locals {
trusted = [
{ ip = "1.2.3.4", port = "80" },
{ ip = "5.6.7.8", port = "81" },
{ ip = "9.10.11.12", port = "81" },
{ ip_range = "1.2.3.4/32", port = "80" },
{ ip_range = "5.6.7.8/32", port = "81" },
{ ip_range = "9.10.11.12/32", port = "81" },
]
}

Expand All @@ -92,7 +92,7 @@ resource "scaleway_instance_security_group_rules" "main" {
for_each = local.trusted
content {
action = "accept"
ip = inbound_rule.value.ip
ip_range = inbound_rule.value.ip_range
port = inbound_rule.value.port
}
}
Expand Down Expand Up @@ -122,7 +122,7 @@ The `inbound_rule` and `outbound_rule` block supports:
If no `port` nor `port_range` are specified, rule will apply to all port.
Only one of `port` and `port_range` should be specified.

- `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.
- `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.

- `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.

Expand Down
Loading