Skip to content

Commit

Permalink
fix: update NACLS data source DOCS (#272)
Browse files Browse the repository at this point in the history
  • Loading branch information
youngmn authored May 9, 2023
1 parent 35de5a4 commit b242fe0
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions docs/data-sources/network_acls.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,30 @@ This resource is useful for look up the list of Network ACL in the region.

## Example Usage

The example below is how to register 2 port rule using an existing Network ACLs.
The example below shows how to make multiple network acl rule using an existing Network ACLs.

```hcl
data "ncloud_network_acls" "nacl" {}
resource "ncloud_network_acl_rule" "nacl_rule" {
count = length(data.ncloud_network_acls.ids)
network_acl_no = data.ncloud_network_acls.nacl.ids[count.index]
priority = 100
protocol = "TCP"
rule_action = "ALLOW"
port_range = "22"
ip_block = "0.0.0.0/0"
network_rule_type = "INBND"
count = length(data.ncloud_network_acls.nacl.network_acls)
network_acl_no = data.ncloud_network_acls.nacl.network_acls[count.index].id
inbound {
priority = 100
protocol = "TCP"
rule_action = "ALLOW"
ip_block = "0.0.0.0/0"
port_range = "22"
}
outbound {
priority = 100
protocol = "TCP"
rule_action = "ALLOW"
ip_block = "0.0.0.0/0"
port_range = "1-65535"
}
}
```

Expand All @@ -28,7 +38,6 @@ The following arguments are supported:
* `network_acl_no_list` - (Optional) List of Network ACL ID to retrieve.
* `vpc_no` - (Optional) The ID of the specific VPC to retrieve.
* `name` - (Optional) name of the specific Network ACLs to retrieve.
* `description` - (Optional) description to create
* `filter` - (Optional) Custom filter block as described below.
* `name` - (Required) The name of the field to filter by
* `values` - (Required) Set of values that are accepted for the given field.
Expand All @@ -49,4 +58,4 @@ The following attributes are exported:
* `vpc_no` - The ID of the associated VPC.
* `is_default` - Whether default or not by VPC creation.
* `name` - The name of Network ACL.
* `description` - Description of Network ACL.
* `description` - Description of Network ACL.

0 comments on commit b242fe0

Please sign in to comment.