Yandex Cloud
Поиск
Связаться с намиПодключиться
  • Истории успеха
  • Документация
  • Блог
  • Все сервисы
  • Статус работы сервисов
    • Доступны в регионе
    • Инфраструктура и сеть
    • Платформа данных
    • Контейнеры
    • Инструменты разработчика
    • Бессерверные вычисления
    • Безопасность
    • Мониторинг и управление ресурсами
    • ИИ для бизнеса
    • Бизнес-инструменты
  • Все решения
    • По отраслям
    • По типу задач
    • Экономика платформы
    • Безопасность
    • Техническая поддержка
    • Каталог партнёров
    • Обучение и сертификация
    • Облако для стартапов
    • Облако для крупного бизнеса
    • Центр технологий для общества
    • Партнёрская программа
    • Поддержка IT-бизнеса
    • Облако для фрилансеров
    • Обучение и сертификация
    • Блог
    • Документация
    • Мероприятия и вебинары
    • Контакты, чаты и сообщества
    • Идеи
    • Тарифы Yandex Cloud
    • Промоакции и free tier
    • Правила тарификации
  • Истории успеха
  • Документация
  • Блог
Проект Яндекса
© 2025 ТОО «Облачные Сервисы Казахстан»
Terraform в Yandex Cloud
  • Начало работы
  • Библиотека решений
    • Обзор
    • История изменений (англ.)
          • vpc_address
          • vpc_gateway
          • vpc_network
          • vpc_private_endpoint
          • vpc_route_table
          • vpc_security_group
          • vpc_security_group_rule
          • vpc_subnet

В этой статье:

  • Example usage
  • Argument Reference
  • Attributes Reference
  1. Справочник Terraform
  2. Ресурсы (англ.)
  3. Virtual Private Cloud (VPC)
  4. Data Sources
  5. vpc_security_group_rule

yandex_vpc_security_group_rule (Data Source)

Статья создана
Yandex Cloud
Обновлена 7 августа 2025 г.
  • Example usage
  • Argument Reference
  • Attributes Reference

Get information about a Yandex VPC Security Group Rule. For more information, see Yandex Cloud VPC.

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"
}

This data source used to define Security Group Rule that can be used by other resources.

Argument ReferenceArgument Reference

The following arguments are supported:

  • security_group_binding (Required) - ID of Security Group that owns the rule.
  • rule_id - (Required) - ID of the Security Group Rule.

Attributes ReferenceAttributes Reference

The following attribute is exported:

  • description - Description of the rule.
  • direction - Direction of the rule. Can be ingress (inbound) or egress (outbound).
  • labels - Labels to assign to this rule.
  • protocol - One of ANY, TCP, UDP, ICMP, IPV6_ICMP.
  • from_port - Minimum port number.
  • to_port - Maximum port number.
  • port - Port number (if applied to a single port).
  • security_group_id - Target security group ID for this rule.
  • predefined_target - Special-purpose targets. self_security_group refers to this particular security group. loadbalancer_healthchecks represents loadbalancer health check nodes.
  • v4_cidr_blocks - The blocks of IPv4 addresses for this rule.
  • v6_cidr_blocks - The blocks of IPv6 addresses for this rule.

Была ли статья полезна?

Предыдущая
vpc_security_group
Следующая
vpc_subnet
Проект Яндекса
© 2025 ТОО «Облачные Сервисы Казахстан»