Please vote on this issue by adding a š reaction to the original issue to help the community and maintainers prioritize this request.
Please do not leave +1 or me too comments, they generate extra noise for issue followers and do not help prioritize the request.
If you are interested in working on this issue or have submitted a pull request, please leave a comment.
If an issue is assigned to the modular-magician user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned to hashibot, a community member has claimed the issue already.
ā·
ā Error: Error updating AlertPolicy "projects/alert-test/alertPolicies/7216876910181223622": googleapi: Error 400: Field alert_policy.conditions[0].condition_threshold.comparison had an invalid value of "COMPARISON_GE": Unsupported comparison; only COMPARISON_LT and COMPARISON_GT are supported at present.
ā
ā with module.log_based_alerts["cmdfo-worker-onboarding-failure"].module.alerts.google_monitoring_alert_policy.main["alert-logging-metrics"],
ā on .terraform/modules/log_based_alerts.alerts/main.tf line 30, in resource "google_monitoring_alert_policy" "main":
ā 30: resource "google_monitoring_alert_policy" "main" {
ā
@nbrys Sorry for the misleading documentation. Looks like the API only supports COMPARISON_LT and COMPARISON_GT currently (API doc). We'll correct the documentation for available values
Community Note
modular-magician
user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned tohashibot
, a community member has claimed the issue already.Terraform Version
v1.3.3 and provider version 4.84.0
Affected Resource(s)
Terraform Configuration Files
This gives the following error
Also the documentation is confusing: https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/monitoring_alert_policy#comparison
Only COMPARISON_LT and COMPARISON_GT are supported currently.
vs
Possible values are: COMPARISON_GT, COMPARISON_GE, COMPARISON_LT, COMPARISON_LE, COMPARISON_EQ, COMPARISON_NE
Expected Behavior
The alert to be created with a GE comparison
Actual Behavior
Unsupported comparison; only COMPARISON_LT and COMPARISON_GT are supported at present.
Steps to Reproduce
b/318495496