-
Notifications
You must be signed in to change notification settings - Fork 541
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
Incorrect validation of alert_type in notification policy #1750
Comments
Thank you for reporting this issue! For maintainers to dig into issues it is required that all issues include the entirety of This issue has been marked with |
+1 We are seeing the same issue.
Where we are using The API returns this value as |
this isn't a bug but an enhancement; we don't currently have support for these values. |
@jacobbednarz Would you please explain what kind of support you meant? |
3.18.0 added validation for publicly documented alert types. if it was working prior to this change, it was because the validation wasn't restricted to only the documented types and allowed anything (including invalid values). if you can find public documentation for the alert types you want to use, send over a PR with them added and we can extend the validation to cater for them. |
Why are you asking public documentation? I thought it's official terraform provider, so it shouldn't suffer from lack of knowledge about API. In the API doc I can only see the method to get all available notifications for a particular account. Maybe it can be used for a future validation. Also, there is a definition of each alert type here, but there is no API types. |
for functionality to be added to the provider (and other SDKs), it needs to be publicly documented and considered stable by the service team. no public documentation means there is no definition of the expected values and endpoints. there are plenty of APIs at Cloudflare and not all of them are intended or ready for public consumption. |
Could you please point me to the documented alert types, so I can track changes? Because I only see the |
Can we get a flag we can set to disable the forced validation added in 3.18? |
@jacobbednarz Can we see where Cloudflare documents a list of available notifications: https://developers.cloudflare.com/fundamentals/notifications/notification-available/ which is also configurable in the admin panel. So these features are used by people in production environments, then why can't we use these notification settings in terraform? |
@jacobbednarz Would this be good enough for considering https://developers.cloudflare.com/ddos-protection/reference/alerts/ + this is the API payload if you follow the instructions in the official docs |
This looks to be a regression actually in 3.19. Seems to be working fine in 3.18. Especially considering that this even appears to be a regression, adding my +1 here in hopes this can be fixed. I'll be downgrading in necessary places until such time. |
My apologies. 3.18 broke this. 3.17 is the last version where this works |
This functionality has been released in v3.22.0 of the Terraform Cloudflare 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! |
Confirmation
Terraform and Cloudflare provider version
Affected resource(s)
cloudflare_notification_policy
Terraform configuration files
Debug output
too many sensitive information
Panic output
No response
Expected output
Actual output
Steps to reproduce
cloudflare_notification_policy
with non-supported by provider (since 3.18.0), but correctalert_type
, for exampleexpiring_service_token_alert
Additional factoids
Not each Cloudflare account has a list of alert types exactly the same you've introduced in the commit below.
References
c424ccd
The text was updated successfully, but these errors were encountered: