mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Alerting: Use expected field name for receiver in HCL export (#87065)
* Use expected field name for receiver in hcl Terraform provider expects `contact_point` instead of `receiver` in notification settings on a rule.
This commit is contained in:
parent
3845033308
commit
70ff229bed
@ -694,7 +694,7 @@ func TestProvisioningApi(t *testing.T) {
|
||||
is_paused = false
|
||||
|
||||
notification_settings {
|
||||
receiver = "Test-Receiver"
|
||||
contact_point = "Test-Receiver"
|
||||
group_by = ["alertname", "grafana_folder", "test"]
|
||||
group_wait = "1s"
|
||||
group_interval = "5s"
|
||||
|
@ -79,7 +79,7 @@ resource "grafana_rule_group" "rule_group_0000" {
|
||||
is_paused = false
|
||||
|
||||
notification_settings {
|
||||
receiver = "Test-Receiver"
|
||||
contact_point = "Test-Receiver"
|
||||
group_by = ["alertname", "grafana_folder", "test"]
|
||||
group_wait = "1s"
|
||||
group_interval = "5s"
|
||||
|
@ -292,7 +292,8 @@ type RelativeTimeRangeExport struct {
|
||||
|
||||
// AlertRuleNotificationSettingsExport is the provisioned export of models.NotificationSettings.
|
||||
type AlertRuleNotificationSettingsExport struct {
|
||||
Receiver string `yaml:"receiver,omitempty" json:"receiver,omitempty" hcl:"receiver"`
|
||||
// Terraform provider uses `contact_point`, so export the field with that name in HCL.
|
||||
Receiver string `yaml:"receiver,omitempty" json:"receiver,omitempty" hcl:"contact_point"`
|
||||
|
||||
GroupBy []string `yaml:"group_by,omitempty" json:"group_by,omitempty" hcl:"group_by"`
|
||||
GroupWait *string `yaml:"group_wait,omitempty" json:"group_wait,omitempty" hcl:"group_wait,optional"`
|
||||
|
Loading…
Reference in New Issue
Block a user