Yandex Cloud
Поиск
Связаться с экспертомПопробовать бесплатно
  • Кейсы
  • Документация
  • Блог
  • Все сервисы
    • Cloud Interconnect
    • Cloud Backup
    • Compute Cloud
    • Object Storage
    • Managed Service for Kubernetes®
    • Managed Service for PostgreSQL
    • Managed Service for ClickHouse®
    • Monium
    • Cloud CDN
    • Network Load Balancer
    • Virtual Private Cloud
    • Cloud DNS
    • Application Load Balancer
    • Yandex Cloud Router
    • Managed Service for MySQL®
    • Managed Service for Valkey™
    • Managed Service for Apache Spark™
    • Managed Service for OpenSearch
    • Managed Service for Apache Kafka®
    • Data Transfer
    • Yandex MPP Analytics Engine for PostgreSQL
    • Managed Service for YDB
    • SpeechKit
    • Yandex Identity Hub
    • Key Management Service
    • Certificate Manager
    • Yandex Lockbox
    • Audit Trails
    • Container Registry
    • Managed Service for Prometheus®
    • Message Queue
    • Identity and Access Management
    • Yandex Cloud Console
    • Resource Manager
    • Yandex Cloud Billing
    • Cloud Apps
    • Yandex AI Studio
    • Yandex BareMetal
    • Smart Web Security
    • Security Deck
    • Yandex Cloud Video
    • Stackland
    • Yandex Managed Service for Apache Airflow®
    • Data Processing
    • Yandex MetaData Hub
    • Yandex WebSQL
    • DataLens
    • Yandex Search API
    • SpeechSense
    • DataSphere
    • Vision OCR
    • Translate
    • Cloud Registry
    • SmartCaptcha
    • Cloud Desktop
    • Yandex SIEM
    • SourceCraft Code Assistant
    • Managed Service for GitLab
    • Cloud Functions
    • API Gateway
    • Yandex Cloud Postbox
    • Serverless Integrations
    • IoT Core
    • Serverless Containers
    • Cloud Notification Service
    • Yandex Query
  • Статус работы сервисов
  • Marketplace
    • Доступны в регионе
    • Инфраструктура и сеть
    • Платформа данных
    • Искусственный интеллект
    • Безопасность
    • Инструменты DevOps
    • Бессерверные вычисления
    • Управление ресурсами
  • Все решения
    • По отраслям
    • По типу задач
    • Экономика платформы
    • Безопасность
    • Техническая поддержка
    • Каталог партнёров
    • Обучение и сертификация
    • Облако для стартапов
    • Облако для крупного бизнеса
    • Центр технологий для общества
    • Партнёрская программа
    • Поддержка IT-бизнеса
    • Облако для фрилансеров
    • Обучение и сертификация
    • Блог
    • Документация
    • Мероприятия и вебинары
    • Контакты, чаты и сообщества
    • Идеи
    • Калькулятор цен
    • Тарифы
    • Акции и free tier
  • Кейсы
  • Документация
  • Блог
Создавайте контент и получайте гранты!Готовы написать своё руководство? Участвуйте в контент-программе и получайте гранты на работу с облачными сервисами!
Подробнее о программе
Проект Яндекса
© 2026 ТОО «Облачные Сервисы Казахстан»
Terraform в Yandex Cloud
  • Начало работы
  • Настройка аутентификации Terraform-провайдера Yandex Cloud
  • Библиотека решений
    • Обзор
    • История изменений (англ.)
          • organization_manager_organization_iam_policy_binding
          • resource_manager_cloud_iam_policy_binding
          • resource_manager_folder_iam_policy_binding
          • sws_security_profile_advanced_rate_limiter_profile_attachment
          • sws_security_profile_waf_profile_attachment

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

  • Example usage
  • Arguments & Attributes Reference
  • Import
  1. Справочник Terraform
  2. Ресурсы (англ.)
  3. Unknown
  4. Resources
  5. sws_security_profile_waf_profile_attachment

yandex_sws_security_profile_waf_profile_attachment (Resource)

Статья создана
Yandex Cloud
Обновлена 28 августа 2026 г.
Открыть в Markdown
  • Example usage
  • Arguments & Attributes Reference
  • Import

Tracks a WAF rule attachment in a Smart Web Security profile and removes the rule before the WAF profile is deleted. The WAF rule itself must be configured in yandex_sws_security_profile.

Example usageExample usage

resource "yandex_sws_waf_profile" "waf" {
  name = "example-waf-profile"

  core_rule_set {
    inbound_anomaly_score = 2
    paranoia_level        = 4
    rule_set {
      name    = "OWASP Core Ruleset"
      version = "4.0.0"
      type    = "CORE"
    }
  }

  analyze_request_body {
    is_enabled        = true
    size_limit        = 8
    size_limit_action = "IGNORE"
  }

  rule_set {
    action     = "DENY"
    is_enabled = true
    priority   = 1
    core_rule_set {
      inbound_anomaly_score = 2
      paranoia_level        = 4
      rule_set {
        name    = "OWASP Core Ruleset"
        version = "4.0.0"
        type    = "CORE"
        id      = "OWASP_CRS_4_0_0"
      }
    }
  }
}

resource "yandex_sws_security_profile" "security_profile" {
  name                     = "example-security-profile"
  default_action           = "ALLOW"
  disallow_data_processing = false

  security_rule {
    name     = "waf"
    priority = 1

    waf {
      mode           = "FULL"
      waf_profile_id = yandex_sws_waf_profile.waf.id
    }
  }
}

resource "yandex_sws_security_profile_waf_profile_attachment" "attachment" {
  security_profile_id = yandex_sws_security_profile.security_profile.id
  waf_profile_id      = yandex_sws_waf_profile.waf.id
  security_rule_name  = "waf"
}

Arguments & Attributes ReferenceArguments & Attributes Reference

  • id (String).
  • security_profile_id (Required)(String). ID of the Smart Web Security profile.
  • security_rule_name (Required)(String). Name of the WAF security rule managed by yandex_sws_security_profile.
  • waf_profile_id (Required)(String). ID of the WAF profile.
  • timeouts [Block].
    • create (String).
    • delete (String).
    • read (String).

ImportImport

The resource can be imported by using their resource ID. For getting it you can use Yandex Cloud Web Console or Yandex Cloud CLI.

#!/bin/bash

terraform import yandex_sws_security_profile_waf_profile_attachment.attachment '<security_profile_id>/<waf_profile_id>/<security_rule_name>'

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

Предыдущая
sws_security_profile_advanced_rate_limiter_profile_attachment
Следующая
vpc_address
Создавайте контент и получайте гранты!Готовы написать своё руководство? Участвуйте в контент-программе и получайте гранты на работу с облачными сервисами!
Подробнее о программе
Проект Яндекса
© 2026 ТОО «Облачные Сервисы Казахстан»