Skip to content

Commit

Permalink
Changed the direction in the firewall rule from inbound to ingress
Browse files Browse the repository at this point in the history
Signed-off-by: Alejandro JNM <alejandrojnm@gmail.com>
  • Loading branch information
alejandrojnm committed Jul 17, 2020
1 parent a50103a commit cd24e0a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
5 changes: 2 additions & 3 deletions civo/resource_firewall_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,9 @@ func resourceFirewallRule() *schema.Resource {
Type: schema.TypeString,
Required: true,
ForceNew: true,
Description: "Will this rule affect inbound or outbound traffic (by default this is inbound)",
Description: "Will this rule affect ingress traffic",
ValidateFunc: validation.StringInSlice([]string{
"inbound",
"outbound",
"ingress",
}, false),
},
"label": {
Expand Down
4 changes: 2 additions & 2 deletions civo/resource_firewall_rule_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ resource "civo_firewall_rule" "testrule" {
start_port = "80"
end_port = "80"
cidr = ["192.168.1.2/32"]
direction = "inbound"
direction = "ingress"
label = "web"
}
Expand All @@ -173,7 +173,7 @@ resource "civo_firewall_rule" "testrule" {
start_port = "443"
end_port = "443"
cidr = ["192.168.1.2/32"]
direction = "inbound"
direction = "ingress"
label = "web_server"
}
`, name)
Expand Down
6 changes: 3 additions & 3 deletions website/docs/r/firewall_rule.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ resource "civo_firewall_rule" "http" {
start_port = "80"
end_port = "80"
cidr = ["192.168.1.2/32", "10.10.10.1/32", format("%s/%s",civo_instance.foo.public_ip,"32")]
direction = "inbound"
direction = "ingress"
label = "server web"
depends_on = [civo_firewall.www]
}
Expand All @@ -41,7 +41,7 @@ The following arguments are supported:
* `start_port` (Required) The start port where traffic to be allowed.
* `end_port` (Required) The end port where traffic to be allowed.
* `cidr` (Required) the IP address of the other end (i.e. not your instance) to affect, or a valid network CIDR (defaults to being globally applied, i.e. 0.0.0.0/0).
* `direction` (Required) will this rule affect inbound or outbound traffic (by default this is inbound)
* `direction` (Required) will this rule affect ingress traffic
* `label` (Optional) a string that will be the displayed name/reference for this rule (optional)

## Attributes Reference
Expand All @@ -54,7 +54,7 @@ The following attributes are exported:
* `start_port` The start port where traffic to be allowed.
* `end_port` The end port where traffic to be allowed.
* `cidr` A list of IP address of the other end (i.e. not your instance) to affect, or a valid network CIDR.
* `direction` Will this rule affect inbound or outbound traffic (by default this is inbound)
* `direction` Will this rule affect ingress traffic
* `label` A string that will be the displayed name/reference for this rule (optional)

## Import
Expand Down

0 comments on commit cd24e0a

Please sign in to comment.