Terraform v0.11.11
resource "newrelic_alert_channel" "pagerduty_v2_alerts" {
name = "pagerduty-v2-alerts"
type = "webhook"
config {
base_url = "https://events.pagerduty.com/v2/enqueue"
# TODO - add headers and payload
}
}
$ terraform import newrelic_alert_channel.pagerduty_v2_alerts 2828189
Acquiring state lock. This may take a few moments...
newrelic_alert_channel.pagerduty_v2_alerts: Importing from ID "2828189"...
newrelic_alert_channel.pagerduty_v2_alerts: Import prepared!
Prepared newrelic_alert_channel for import
newrelic_alert_channel.pagerduty_v2_alerts: Refreshing state... [id=2828189]
Error: config.0.payload.payload: '' expected type 'string', got unconvertible type 'map[string]interface {}'
Releasing state lock. This may take a few moments...
Resource should import without an error.
Failed with the error shown above.
Please list the steps required to reproduce the issue, for example:
terraform import newrelic_alert_channel.pagerduty_v2_alerts 2828189Here's what the resource looks like from the UI. Hopefully this is easy to reproduce.

Text of JSON payload:
{
"payload": {
"summary": "$CONDITION_NAME",
"source": "$POLICY_NAME",
"severity": "info",
"custom_details": {
"account_id": "$ACCOUNT_ID",
"account_name": "$ACCOUNT_NAME",
"closed_violations_count_critical": "$CLOSED_VIOLATIONS_COUNT_CRITICAL",
"closed_violations_count_warning": "$CLOSED_VIOLATIONS_COUNT_WARNING",
"condition_family_id": "$CONDITION_FAMILY_ID",
"condition_id": "$CONDITION_ID",
"condition_name": "$CONDITION_NAME",
"current_state": "$EVENT_STATE",
"details": "$EVENT_DETAILS",
"duration": "$DURATION",
"event_type": "$EVENT_TYPE",
"incident_acknowledge_url": "$INCIDENT_ACKNOWLEDGE_URL",
"incident_id": "$INCIDENT_ID",
"incident_url": "$INCIDENT_URL",
"open_violations_count_critical": "$OPEN_VIOLATIONS_COUNT_CRITICAL",
"open_violations_count_warning": "$OPEN_VIOLATIONS_COUNT_WARNING",
"owner": "$EVENT_OWNER",
"policy_name": "$POLICY_NAME",
"policy_url": "$POLICY_URL",
"runbook_url": "$RUNBOOK_URL",
"severity": "$SEVERITY",
"targets": "$TARGETS",
"timestamp": "$TIMESTAMP",
"violation_callback_url": "$VIOLATION_CALLBACK_URL",
"violation_chart_url": "$VIOLATION_CHART_URL"
}
},
"routing_key": "REDACTED,
"links": [{
"href": "$INCIDENT_URL",
"text": "NewRelic Incident URL"
}],
"event_action": "trigger",
"client": "NewRelic",
"client_url": "https://one.newrelic.com"
}
I know this code has been changed quite a bit in recent versions of the provider.
@pickgr we have a fix being released for this shortly.
@ctrombley verified that this is resolved with version 1.13.1 . Thanks for the quick turn-around!