Skip to content

Commit fbc831d

Browse files
authored
vpc_firewall_rules: update documentation (#405)
Updated the documentation to address the following points. * Mention that rules are exhaustive and will overwrite existing rules. * Describe how to specify port ranges for the `ports` attribute. Closes #404.
1 parent 31d1cca commit fbc831d

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

docs/resources/oxide_vpc_firewall_rules.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ page_title: "oxide_vpc_firewall_rules Resource - terraform-provider-oxide"
44

55
# oxide_vpc_firewall_rules (Resource)
66

7-
This resource manages VPC subnets.
7+
This resource manages VPC firewall rules.
8+
9+
!> Firewall rules defined by this resource are considered exhaustive and will
10+
overwrite any other firewall rules for the VPC once applied.
811

912
## Example Usage
1013

@@ -13,9 +16,9 @@ resource "oxide_vpc_firewall_rules" "example" {
1316
vpc_id = "6556fc6a-63c0-420b-bb23-c3205410f5cc"
1417
rules = [
1518
{
16-
action = "deny"
17-
description = "custom deny"
18-
name = "custom-deny-http"
19+
action = "allow"
20+
description = "Allow HTTPS."
21+
name = "allow-https"
1922
direction = "inbound"
2023
priority = 50
2124
status = "enabled"
@@ -26,8 +29,8 @@ resource "oxide_vpc_firewall_rules" "example" {
2629
value = "default"
2730
}
2831
]
29-
ports = ["8123"]
30-
protocols = ["ICMP"]
32+
ports = ["443"]
33+
protocols = ["TCP"]
3134
},
3235
targets = [
3336
{
@@ -84,7 +87,7 @@ Optional:
8487

8588
- `hosts` (Set) If present, the sources (if incoming) or destinations (if outgoing) this rule applies to. (see [below for nested schema](#nestedatt--hosts))
8689
- `protocols` (Array of Strings) If present, the networking protocols this rule applies to. Possible values are: TCP, UDP and ICMP.
87-
- `ports` (Array of Strings) If present, the destination ports this rule applies to.
90+
- `ports` (Array of Strings) If present, the destination ports this rule applies to. Can be a mix of single ports (e.g., `"443"`) and port ranges (e.g., `"30000-32768"`).
8891

8992
<a id="nestedatt--hosts"></a>
9093

0 commit comments

Comments
 (0)