Deleting a WAF exclusion rule
- In the management console
, select the folder containing the WAF profile. - In the list of services, select Smart Web Security.
- In the left-hand panel, select WAF profiles.
- Select the profile where you want to delete an exclusion rule.
- In the left-hand menu, go to the
Exclusion rules tab. - Next to the rule in question, click
and select Delete. - Confirm the deletion.
With Terraform
Terraform is distributed under the Business Source License
For more information about the provider resources, see the relevant documentation on the Terraform
If you do not have Terraform yet, install it and configure the Yandex Cloud provider.
-
Open the Terraform configuration file and delete the
exclusion_rulesection defining your WAF exclusion rule from theyandex_sws_waf_profiledescription.Example of an exclusion rule description in the Terraform configuration
# WAF profile resource "yandex_sws_waf_profile" "default" { name = "waf-profile-default" core_rule_set { inbound_anomaly_score = 2 paranoia_level = local.waf_paranoia_level rule_set { name = "OWASP Core Ruleset" version = "4.0.0" } } ... # Exclusion rule exclusion_rule { name = "<exclusion_rule_name>" exclude_rules { exclude_all = <true_or_false> rule_ids = ["rule_1_ID","rule_2_ID"] } } }For more information about
sws_waf_profileproperties, see this Terraform provider article. -
Apply the changes:
-
In the terminal, go to the directory where you edited the configuration file.
-
Make sure the configuration file is correct using this command:
terraform validateIf the configuration is correct, you will get this message:
Success! The configuration is valid. -
Run this command:
terraform planYou 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.
-
Apply the changes:
terraform apply -
Type
yesand press Enter to confirm the changes.
-
You can check the deletion of the resources in the management console
Use the update REST API method for the WafProfile resource or the WafProfile/Update gRPC API call.