resource "ncloud_network_acl" "exem-dsk-acl" { //접근 제어 목록
  vpc_no = ncloud_vpc.exem-dsk-vpc.id
  name = "exem-dsk-acl"
}

resource "ncloud_network_acl_rule" "exem-dsk-acl-list" { // 접근 제어 룰
  network_acl_no = ncloud_network_acl.exem-dsk-acl.id

  inbound { // 인바운드 규칙
    priority = 0
    protocol = "TCP"
    rule_action = "ALLOW"
    ip_block = "118.223.123.161/32"
    port_range = "22"
  }
  
  inbound { // 인바운드 규칙
    priority = 1
    protocol = "TCP"
    rule_action = "ALLOW"
    ip_block = "10.40.0.0/16"
    port_range = "1-65535"
  }

  inbound { // 인바운드 규칙
    priority = 2
    protocol = "TCP"
    rule_action = "ALLOW"
    ip_block = "0.0.0.0/0"
    port_range = "443"
  }

  inbound { // 인바운드 규칙
    priority = 3
    protocol = "TCP"
    rule_action = "ALLOW"
    ip_block = "0.0.0.0/0"
    port_range = "80"
  }

  inbound { // 인바운드 규칙
    priority = 199
    protocol = "TCP"
    rule_action = "DROP"
    ip_block = "0.0.0.0/0"
    port_range = "22"
  }

  outbound { // 아웃바운드 규칙
    priority = 0
    protocol = "TCP"
    rule_action = "ALLOW"
    ip_block = "0.0.0.0/0"
    port_range = "1-65535"
  }

}