Yandex Cloud
Documentation
PresentationContact UsTry it for free
© 2026 Direct Cursus Technology L.L.C.
Terraform in Yandex Cloud
  • Getting started
  • Setting up Yandex Cloud Terraform provider authentication
  • Solution library
    • Overview
    • Release notes
          • vpc_address
          • vpc_gateway
          • vpc_network
          • vpc_private_endpoint
          • vpc_route_table
          • vpc_security_group
          • vpc_security_group_rule
          • vpc_subnet

In this article:

  • Example usage
  • Arguments & Attributes Reference
  1. Terraform reference
  2. Resources
  3. Virtual Private Cloud
  4. Data Sources
  5. vpc_security_group_rule

yandex_vpc_security_group_rule (DataSource)

Written by
Yandex Cloud
Updated at September 23, 2026
View in Markdown
  • Example usage
  • Arguments & Attributes Reference

Example usageExample 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 ReferenceArguments & Attributes Reference

  • description (Read-Only) (String).
  • direction (Read-Only) (String).
  • from_port (Read-Only) (Number).
  • id (Read-Only) (String).
  • labels (Read-Only) (Map Of String).
  • port (Read-Only) (Number).
  • predefined_target (Read-Only) (String).
  • protocol (Read-Only) (String).
  • rule_id (Required)(String).
  • security_group_binding (Required)(String).
  • security_group_id (Read-Only) (String).
  • to_port (Read-Only) (Number).
  • v4_cidr_blocks (Read-Only) (List Of String).
  • v6_cidr_blocks (Read-Only) (List Of String).

Was the article helpful?

Previous
vpc_security_group
Next
vpc_subnet
© 2026 Direct Cursus Technology L.L.C.