Deleting a WAF exclusion rule
- In the management console
, select the folder the WAF profile is in. - In the list of services, select Smart Web Security.
- In the left-hand panel, select WAF profiles.
- Select the profile to delete an exclusion rule from.
- In the left-hand menu, go to the
Exclusion rules tab. - In the row with the rule, 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 documentation on the Terraform
If you don't have Terraform, install it and configure the Yandex Cloud provider.
-
Open the Terraform configuration file and delete the
exclusion_rule
section with the WAF exclusion rule from the description of theyandex_sws_waf_profile
security profile.Below is an 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 the
sws_waf_profile
resource parameters in Terraform, see the relevant provider documentation . -
Apply the changes:
-
In the terminal, change to the folder where you edited the configuration file.
-
Make sure the configuration file is correct using the command:
terraform validate
If the configuration is correct, the following message is returned:
Success! The configuration is valid.
-
Run the command:
terraform plan
The terminal will display a list of resources with parameters. No changes are made at this step. If the configuration contains errors, Terraform will point them out.
-
Apply the configuration changes:
terraform apply
-
Confirm the changes: type
yes
in the terminal and press Enter.
-
You can check the deletion of the resources using the management console