Skip to content
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

When create a alert rule for prometheus with severity = 0 for CRITICAL, it skips severity. #25399

Closed
1 task done
avinode-amagdy opened this issue Mar 25, 2024 · 2 comments · Fixed by #25408
Closed
1 task done

Comments

@avinode-amagdy
Copy link

avinode-amagdy commented Mar 25, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • 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 and review the contribution guide to help.

Terraform Version

1.2.6

AzureRM Provider Version

~> 3.86

Affected Resource(s)/Data Source(s)

azurerm_monitor_alert_prometheus_rule_group

Terraform Configuration Files

terraform {
  required_version = ">= 1"
  required_providers {
    azurerm = {
      source  = "hashicorp/azurerm"
      version = "~> 3.86"
    }
    kubernetes = {
      source  = "hashicorp/kubernetes"
      version = "~> 2.25"
    }
  }
}

Debug Output/Panic Output

Expected Behaviour

To create the alertmanager rule with severity = 0, for CRITICAL alerts.

Actual Behaviour

It skips the severity and the portal falls back to the default value severity = 3 for INFORMATIONAL

Steps to Reproduce

try to create aks cluster and configure a AMW-prometheus instance with it.
Then try to create new azurerm_monitor_alert_prometheus_rule_group with severity = 0 .. check the created resource in the portal and verify the severity of the created resource.

Important Factoids

No response

References

The code has the issue here:

https://github.com/hashicorp/terraform-provider-azurerm/blob/main/internal/services/monitor/monitor_alert_prometheus_rule_group_resource.go#L438

@sinbai
Copy link
Contributor

sinbai commented Mar 27, 2024

Hi @avinode-amagdy thanks for opening this issue. I have submitted PR #25408 to fix this issue. Could you please track it for more updates?

@github-actions github-actions bot added this to the v3.99.0 milestone Apr 5, 2024
Copy link

github-actions bot commented May 6, 2024

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants