-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't override anomaly based rules for azurerm_cdn_frontdoor_firewall_policy due to incorrect validator #18480
Comments
Hey @fristedt I don't think we'll be able to set AnomalyScoring, per the Azure docs:
This is the config I was able to use in order to disable the
Which ended up with this: This is more of a workaround than a fix since I wasn't able to get this working without setting the action to |
Hey @Amier3, thanks for the workaround! It works great. I think it's strange that the documentation states that only those 4 rules are supported as when I import an existing Front Door WAF the terraform diff shows that the current rule action is set to "AnomalyScoring" for all rules. Perhaps the documentation is incorrect?
Anyway, the workaround is great so I don't think this is urgent to fix. |
@fristedt, I don't blame you for being a bit confused, this is not super clear and the error message from the API is a bit cryptic as well. Thank you for opening this issue, I am currently working on a fix. This has to do with the way the service implemented the override rules. The DRS 2.0 |
This functionality has been released in v3.30.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
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. |
Is there an existing issue for this?
Community Note
Terraform Version
1.2.8
AzureRM Provider Version
3.23.0
Affected Resource(s)/Data Source(s)
azurerm_cdn_frontdoor_firewall_policy
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
We should be able to disable rules from managed rule set
Microsoft_DefaultRuleSet_2.0
Actual Behaviour
Terraform validation blocks us from disabling rules.
Steps to Reproduce
We want to disable certain managed rules using
azurerm_cdn_frontdoor_firewall_policy
, but the validation for anomaly based rule sets is incorrect (e.g. Microsoft_DefaultRuleSet_2.0). Terraform should acceptAnomalyScoring
as a valid action, but it only allowsAllow Log Block Redirect
.I think the fix is as easy as updating the validator here:
terraform-provider-azurerm/internal/services/cdn/cdn_frontdoor_firewall_policy_resource.go
Lines 412 to 417 in de964e8
Important Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered: