terraform-provider-grafana icon indicating copy to clipboard operation
terraform-provider-grafana copied to clipboard

Support different alertmanager in resources like grafana_contact_point and grafana_notification_policy

Open tutunak opened this issue 2 years ago • 5 comments

In the current version of provider during creating grafana_contact_point and grafana_notification_policy they will be created in default alertmanager Grafana. But if you have ngalertmanager alertmanger you couldn't choose it. This functionality available in the web gui but not in provider.

tutunak avatar Feb 01 '23 07:02 tutunak

This will also require a feature request in Grafana, as it currently stands. The API in Grafana that Terraform calls also does not have the ability to create objects in external alertmanagers.

The core issue here, is that the structure of contact points and other resources is not the same between Grafana and Alertmanager - it's not just an option that would be different, it would need to be a totally different set of resources entirely. Right now we're working on a unification project to bring these into alignment over the next few months.

Once that's done, this should become much easier to tackle, as it'll just be one unified resource definition that works everywhere, rather than two separate contact point structures per system.

alexweav avatar Feb 03 '23 16:02 alexweav

I've been trying Grafana Cloud these couple days. And I noticed the Contact Point and Notification Policy is installed to default alertmanager. But the default setup of Grafana Cloud has a second alertmanager ngalertmanager. It took me a while to understand why my setup wasn't working. And my current workaround is resetup whatever I did in Terraform for the ngalertmanager to make things work.

Here is what I observed:

  • grafana_synthetic_monitoring_check -> second alertmanager ngalertmanager
  • grafana_contact_point -> default alertmanager Grafana
  • grafana_notification_policy -> default alertmanager Grafana

I searched the docs, there seem to be no way to pick the alertmanger. I hope there is a better way than re-doing things on web ui.

wdv4758h avatar Apr 26 '23 07:04 wdv4758h

Same here. I am looking forward to being able to choose alertmanager type.

yoramshai avatar Sep 19 '23 14:09 yoramshai