我在使用 terraform 将规则推送到新遗迹时收到以下错误
INVALID_PARAMETER: The parameter provided does not correspond to any valid entity[0m
with newrelic_notification_channel.cloudops,
on main.tf line 300, in resource "newrelic_notification_channel" "PD_TEST":
300: resource "newrelic_notification_channel" "PD_Channel"
Entities' types do not match
我正在使用以下代码:
resource "newrelic_notification_channel" "PD_Channel" {
name = "pagerduty-channel-production"
type = "PAGERDUTY_SERVICE_INTEGRATION"
destination_id = "8dasd-asdad-adsadsa-xxxx"
product = "IINT"
property {
key = "summary"
value = "{{ annotations.title.[0] }}"
}
property {
key = "customDetails"
value = <<-EOT
{
"id":{{json issueId}},
"IssueURL":{{json issuePageUrl}},
"NewRelic priority":{{json priority}},
"Total Incidents":{{json totalIncidents}},
"Impacted Entities":"{{#each entitiesData.names}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"Runbook":"{{#each accumulations.runbookUrl}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"Description":"{{#each annotations.description}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"isCorrelated":{{json isCorrelated}},
"Alert Policy Names":"{{#each accumulations.policyName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"Alert Condition Names":"{{#each accumulations.conditionName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
"Workflow Name":{{json workflowName}}
}
EOT
}
}
我正在使用 terraform 推送 NR 警报,在这里我尝试创建 Pagerduty 详细信息
错误是您正在尝试创建与类型不是 PAGERDUTY_SERVICE_INTEGRATION 的目标相关的此通道
您可以通过 nerdgraph 验证目的地类型