-
Notifications
You must be signed in to change notification settings - Fork 272
Open
Description
Terraform Version
via Pulumi
Terraform Grafana Provider Version
v3.3.0
Grafana Version
11.6.5
Affected Resource(s)
- grafana_rule_group
Terraform Configuration Files
No response
Expected Behavior
I am using the pulumiverse_grafana 0.60 Python module that uses v3.3.0 of the TF Grafana provider.
The documentation for importing alert rule groups is misleading, as the name of the rule group (the ruleGroup field as returned by the Grafana API) is required for importing not the title (as returned by the Grafana API).
from $GRAFANA_URL/api/v1/provisioning/alert-rules:
{
"id": XX,
"uid": "XXXXXXX",
"orgID": X,
"folderUID": "FOLDERUID",
"ruleGroup": "Alert Group",
"title": "Alert Group Item",
"condition": "C",
"data": [
...
Actual Behavior
Performing an import using:
pulumi import -y grafana:alerting/ruleGroup:RuleGroup rule_group_alert_group_item "FOLDERUID:Alert Group Item"
will fail with:
error: Preview failed: resource 'FOLDERUID:Alert Group Item' does not exist
Steps to Reproduce
Create an alert group with multiple alert items and ensure their titles are different from the parent rule group. Then export the rulegroup via API and attempt to import using the title field.
Important Factoids
No response
References
https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/rule_group

Metadata
Metadata
Assignees
Labels
No labels