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

[Feature Request]: Separate grafana_rule_group and grafana_alert_rule resources #1507

Open
bnjns opened this issue Apr 23, 2024 · 0 comments

Comments

@bnjns
Copy link

bnjns commented Apr 23, 2024

Feature Request

At the moment, you create multiple alert rules using rule blocks in the grafana_rule_group resource. This works well for simple configurations where you can configure all the alerts in a single place, but it breaks down for complex configurations.

For example, we use various Terraform modules to build up our dashboard JSON - each of these needs to conditionally create any relevant alerts within its own module, which means that these alerts cannot share the same evaluation/rule group, even though that's how they'd appear if you created them manually. At the moment, we work around this issue by making each alert have its own evaluation group, but that's not very pleasant in the UI and makes navigating the alerts frustrating.

Separating the rule blocks into their own grafana_alert_rule resource would make this configuration much easier to achieve, and I'd argue that this is much more aligned to how Terraform expects to manage resources (the UI shows the evaluation group and alert rules as separate entities, which should be managed separately by Terraform).

I appreciate that given how the alerting API appears to be designed this might be a challenge, but I feel this would be a better design/UX for the provider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants