Yandex Cloud
Search
Contact UsGet started
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • AI for business
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
Yandex Smart Web Security
  • Getting started
    • All guides
      • Creating a profile
      • Editing basic profile settings
      • Getting profile information
      • Deleting a profile
      • Configuring rule sets
      • Getting information about a rule set
      • Adding an exclusion rule
      • Updating an exclusion rule
      • Deleting an exclusion rule
    • Address lists
    • Viewing operations
    • Configuring monitoring
    • Setting up alerts
    • Configuring logs via Smart Web Security
    • Configuring logs via Application Load Balancer
    • Migrating to WAF with support for Yandex rules
    • Overview
    • Security profiles
    • WAF
    • ARL (request limit)
    • Rules
    • Conditions
    • Lists
    • Protecting domains
    • Logging
    • Quotas and limits
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Release notes
  1. Step-by-step guides
  2. WAF profiles
  3. Getting information about a rule set

Getting information about a WAF rule set

Written by
Yandex Cloud
Updated at October 20, 2025
Management console
Terraform
API
  1. In the management console, select the folder containing the WAF profile.
  2. In the list of services, select Smart Web Security.
  3. In the left-hand panel, select WAF profiles.
  4. Select the profile with the rule set you need.
  5. The Rule sets in order of priority section will display the information on rule sets:
    • Rule set version.
    • Number of active rules.
    • Anomaly threshold and paranoia level (for the OWASP set).

With Terraform, you can quickly create a cloud infrastructure in Yandex Cloud and manage it using configuration files. These files store the infrastructure description written in HashiCorp Configuration Language (HCL). If you change the configuration files, Terraform automatically detects which part of your configuration is already deployed, and what should be added or removed.

Terraform is distributed under the Business Source License. The Yandex Cloud provider for Terraform is distributed under the MPL-2.0 license.

For more information about the provider resources, see the relevant documentation on the Terraform website or its mirror.

If you do not have Terraform yet, install it and configure the Yandex Cloud provider.

To get information about a WAF rule set using Terraform:

  1. Add the data and output sections to the Terraform configuration file:

    data "yandex_sws_waf_rule_set_descriptor" "owasp4" {
      name    = "OWASP Core Ruleset"
      version = "4.0.0"
    }
    
    output "waf_rules" {
      value = data.yandex_sws_waf_rule_set_descriptor.owasp4.rules
    }
    

    Where:

    • data "yandex_sws_waf_rule_set_descriptor": Description of the WAF rule set as a data source:
      • name: Name of the WAF rule set.
      • version: Rule set version.
    • output "waf_rules": Output variable that contains information about the WAF rule set:
      • value: Return value.

    You can replace rules with any other parameter to get the information you need. For more information about the yandex_sws_waf_rule_set_descriptor data source properties, see this Terraform provider article.

  2. Create the resources:

    1. In the terminal, go to the directory where you edited the configuration file.

    2. Make sure the configuration file is correct using this command:

      terraform validate
      

      If the configuration is correct, you will get this message:

      Success! The configuration is valid.
      
    3. Run this command:

      terraform plan
      

      You will see a detailed list of resources. No changes will be made at this step. If the configuration contains any errors, Terraform will show them.

    4. Apply the changes:

      terraform apply
      
    5. Type yes and press Enter to confirm the changes.

    Terraform will create the required resources and display their output variables. To check the results, run this command:

    terraform output
    

    Result:

    waf_rules = tolist([
      {
        "anomaly_score" = 5
        "id" = "owasp-crs-v4.0.0-id******-method-enforcement"
        "paranoia_level" = 1
      },
    ...
      {
        "anomaly_score" = 5
        "id" = "owasp-crs-v4.0.0-id******-attack-java"
        "paranoia_level" = 4
      },
    ])
    

Use the get REST API method for the WafProfile resource or the WafProfile/Get gRPC API call.

Was the article helpful?

Previous
Configuring rule sets
Next
Adding an exclusion rule
© 2025 Direct Cursus Technology L.L.C.