Yandex Cloud
Search
Discuss with expertTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
    • Cloud Interconnect
    • Cloud Backup
    • Cloud Registry
    • Yandex AI Studio
    • Compute Cloud
    • Object Storage
    • Managed Service for Kubernetes®
    • Yandex BareMetal
    • Smart Web Security
    • Security Deck
    • Managed Service for PostgreSQL
    • Managed Service for ClickHouse®
    • Monium
    • Cloud CDN
    • Network Load Balancer
    • Virtual Private Cloud
    • Cloud DNS
    • Application Load Balancer
    • Yandex Cloud Video
    • Stackland
    • Yandex Cloud Router
    • Yandex Managed Service for Trino
    • Managed Service for MySQL®
    • Managed Service for Valkey™
    • Managed Service for Apache Spark™
    • Yandex StoreDoc
    • Managed Service for OpenSearch
    • Managed Service for Apache Kafka®
    • Data Transfer
    • Yandex MPP Analytics Engine for PostgreSQL
    • Yandex Managed Service for Apache Airflow®
    • Data Processing
    • Yandex MetaData Hub
    • Managed Service for YDB
    • Managed Service for Sharded PostgreSQL
    • Managed Service for YTsaurus
    • Yandex WebSQL
    • DataLens
    • Yandex Search API
    • SpeechSense
    • SpeechKit
    • DataSphere
    • Vision OCR
    • Translate
    • Yandex Identity Hub
    • Key Management Service
    • Certificate Manager
    • Yandex Lockbox
    • Audit Trails
    • SmartCaptcha
    • Cloud Desktop
    • Yandex SIEM
    • SourceCraft Code Assistant
    • Container Registry
    • Managed Service for GitLab
    • Managed Service for Prometheus®
    • Cloud Functions
    • API Gateway
    • Yandex Cloud Postbox
    • Message Queue
    • Serverless Integrations
    • IoT Core
    • Data Streams
    • Serverless Containers
    • Cloud Notification Service
    • Yandex Query
    • Identity and Access Management
    • Yandex Cloud Console
    • Resource Manager
    • Yandex Cloud Billing
    • Yandex Cloud Quota Manager
    • Cloud Apps
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • 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
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 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 the new condition format in the API, CLI, and Terraform
    • Overview
    • Security profiles
    • WAF
    • ARL (request limit)
    • Rules
    • Conditions
    • Lists
    • Managing bot traffic
    • Protecting domains
    • Response templates
    • 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. Deleting a profile

Deleting a WAF profile

Written by
Yandex Cloud
Updated at September 17, 2026
View in Markdown

Before you delete a WAF profile, delete all WAF rules from the associated security profiles.

Management console
Terraform
API
  1. In the management console, select the folder containing the WAF profile.

  2. Navigate to Smart Web Security.

  3. In the left-hand panel, select WAF profiles.

  4. Save or memorize the ID of the profile you want to delete.

  5. In the left-hand panel, select Security profiles and then the security profile that uses the WAF profile you want to delete.

  6. In the Security rules tab, delete the WAF profile rules:

    1. In the Rule type: filter, select Web Application Firewall.
    2. Click → Delete next to the rule associated with the WAF profile with the relevant ID.
    3. Confirm the deletion.
  7. Similarly, delete the WAF rules from all associated security profiles.

  8. In the left-hand panel, select WAF profiles.

  9. In the row with the profile, click → Delete.

  10. Confirm the deletion.

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 guides on the Terraform website or its mirror.

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

To manage infrastructure using Terraform under a service account or user accounts (a Yandex account, a federated account, or a local user), authenticate using the appropriate method.

To delete the Yandex Smart Web Security WAF profile you created with the help of Terraform:

  1. Open the Terraform configuration file and delete the fragment describing the WAF profile.

    Example of a WAF profile description in the Terraform configuration
    # Declaring local variables
    locals {
      # In the basic set, rules of this paranoia level and below will be enabled
      waf_paranoia_level = 1
    
      # OWASP Core Ruleset identification
      ruleset_name    = "OWASP Core Ruleset"
      ruleset_version = "4.0.0"
      ruleset_id      = "OWASP_CRS_4_0_0"
      ruleset_type    = "CORE"
    }
    
    # OWASP Core Rule Set data source
    data "yandex_sws_waf_rule_set_descriptor" "source" {
      name    = local.ruleset_name
      version = local.ruleset_version
    }
    
    # WAF profile
    resource "yandex_sws_waf_profile" "default" {
      name = "waf-profile-owasp"
    
      # Rule set
      rule_set {
        action     = "DENY"
        is_enabled = true
        priority   = 1
    
        # Basic rule set
        core_rule_set {
          inbound_anomaly_score = 2
          paranoia_level        = local.waf_paranoia_level
          rule_set {
            name    = local.ruleset_name
            version = local.ruleset_version
            id      = local.ruleset_id
            type    = local.ruleset_type
          }
        }
      }
    
      # Enabling rules from the basic set if their paranoia level is not higher than the value defined in the waf_paranoia_level variable
      dynamic "rule" {
        for_each = [
          for rule in data.yandex_sws_waf_rule_set_descriptor.source.rules : rule
          if rule.paranoia_level <= local.waf_paranoia_level
        ]
        content {
          rule_id     = rule.value.id
          is_enabled  = true
          is_blocking = false
        }
      }
    }
    
  2. Apply the changes:

    1. In the terminal, navigate to the configuration file directory.

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

      terraform validate
      

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

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

      terraform plan
      

      You will see a list of resources and their properties. No changes will be made at this step. Terraform will show any errors in the configuration.

    4. Apply the configuration changes:

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

You can check the deletion of the resources in the management console.

Use the delete REST API method for the WafProfile resource or the WafProfile/Delete gRPC API call.

Was the article helpful?

Previous
Getting profile information
Next
Configuring rule sets
© 2026 Direct Cursus Technology L.L.C.