yandex_vpc_security_group_rule (DataSource)
Статья создана
Обновлена 9 февраля 2026 г.
Example usage
//
// Get information about existing VPC Security Group Rule.
//
data "yandex_vpc_security_group_rule" "rule1" {
security_group_binding = "my-sg-id"
rule_id = "my-rule-id"
}
Arguments & Attributes Reference
description(String). The resource description.direction(Required)(String). Direction of the Security group rule. Can beingress(inbound network traffic to the VPC network) oregress(outbound network traffic from the VPC network).from_port(Number). Minimum port number. Applicable for TCP and UDP protocols.id(Read-Only) (String). The resource identifier.labels(Map Of String). A set of key/value label pairs which assigned to resource.port(Number). Port number (if applied to a single port).predefined_target(String). Special-purpose targets. Theself_security_grouptarget refers to this particular security group. Theloadbalancer_healthcheckstarget represents NLB health check nodes.protocol(String). Specific network protocol. Can be one ofANY,TCP,UDP,ICMP,IPV6_ICMP.rule_id(Required)(String).security_group_binding(Required)(String). The id of target security group which rule belongs to.security_group_id(String). Target security group ID for this Security group rule.to_port(Number). Maximum port number. Applicable for TCP and UDP protocols.v4_cidr_blocks(List Of String). The list of IPv4 CIDR prefixes for this Security group rule.v6_cidr_blocks(List Of String). The list of IPv6 CIDR prefixes for this Security group rule. Not supported yet.