Files
ncp-terraform/terraform/ncp_acl.tf
2023-10-24 15:33:16 +09:00

33 lines
777 B
HCL

resource "ncloud_network_acl" "jh-test-ncloud-acl" { //접근 제어 목록
vpc_no = ncloud_vpc.jh-test-ncloud-vpc.id
name = "jh-test-ncloud-acl"
}
resource "ncloud_network_acl_rule" "jh-test-ncloud-acl-list" { // 접근 제어
network_acl_no = ncloud_network_acl.jh-test-ncloud-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 = "0.0.0.0/0"
port_range = "443"
}
outbound { // 아웃바운드 규칙
priority = 0
protocol = "TCP"
rule_action = "ALLOW"
ip_block = "0.0.0.0/0"
port_range = "1-65535"
}
}