Closed musicislife08 closed 3 months ago
Hi @musicislife08 thanks for your feedback, as I know the BadBots
is not in the validate list in the current version. Is there any doc/link you see this value for the rule group name?
From the azure portal you can see the name. and the same string "BadBots" shows up when you query a waf policy from the azure cli
Hello,
"GoodBots" and "UnknownBots" are affected aswell, you can see it also on https://resources.azure.com/ when set
Extending following list might fix it: internal/services/network/validate/web_application_firewall_policy.go#L7-L32
Hello,
When do you plan to "resolve" this? We are started to use BotManager RuleSet 1.0 a month ago, but without this, BotManager rules and Exclusions cant be handled by terraform, because we cant define rule groups for rule_group_override. For example this:
// rule_group_override { // rule_group_name = "UnknownBots" // rule { // id = "300100" // enabled = true // action = "Log" // } // rule { // id = "300200" // enabled = true // action = "Block" // } // rule { // id = "300600" // enabled = true // action = "Block" // } // }
thx
Hi @MICHAL53Q @musicislife08 @Snoopenz These rule names have been added since #20221. Could you please have a try with the latest AzureRM provider to see if it addresses this issue?
Hello
I encountered this error when excluding rules from Microsoft_BotManagerRuleSet.
│ Error: expected managed_rules.0.exclusion.1.excluded_rule_set.0.type to be one of ["OWASP" "Microsoft_DefaultRuleSet"], got Microsoft_BotManagerRuleSet
│
│ with module.waf_policy.azurerm_web_application_firewall_policy.appgw_waf,
│ on ..\..\modules\waf_policy\main.tf line 16, in resource "azurerm_web_application_firewall_policy" "appgw_waf":
│ 16: managed_rules {
│
╵
╷
│ Error: expected managed_rules.0.exclusion.1.excluded_rule_set.0.version to be one of ["2.1" "3.2"], got 1.0
│
│ with module.waf_policy.azurerm_web_application_firewall_policy.appgw_waf,
│ on ..\..\modules\waf_policy\main.tf line 16, in resource "azurerm_web_application_firewall_policy" "appgw_waf":
│ 16: managed_rules {
From the documentation (Version 3.113.0), Microsoft_BotManagerRuleSet is currently not part of the allowed values:
The excluded_rule_set block supports the following:
type - (Optional) The rule set type. The only possible value include Microsoft_DefaultRuleSet and OWASP. Defaults to OWASP.
version - (Optional) The rule set version. The only possible value include 2.1 (for rule set type Microsoft_DefaultRuleSet) and 3.2 (for rule set type OWASP). Defaults to 3.2.
rule_group - (Optional) One or more rule_group block defined below.
Could you please update the validation to include Microsoft_BotManagerRuleSet so that we can fully utilize Terraform in managing WAF rules?
@arisabejuela Thanks for reporting this! I cresated a PR to add Microsoft_BotManagerRuleSet
to the validation.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Is there an existing issue for this?
Community Note
Terraform Version
1.3.4
AzureRM Provider Version
3.33.0
Affected Resource(s)/Data Source(s)
azurerm_web_application_firewall_policy
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
The provider should allow disabling of the BadBots ruleset
Actual Behaviour
Fails to apply as the provider does not list "BadBots" as a valid option
Steps to Reproduce
add a
Managed_rule_set
to any waf with the following settingsImportant Factoids
Standard azure cloud
References
No response