Resource newrelic_notification_channel
: property
block issue with type MOBILE_PUSH
#2781
Open
Description
Hi
Terraform Version
Terraform v1.9.8
on darwin_arm64
+ provider registry.terraform.io/newrelic/newrelic v3.52.1
Affected Resource(s)
newrelic_notification_channel
Terraform Configuration
terraform {
required_providers {
newrelic = {
source = "newrelic/newrelic"
version = "3.52.1"
}
}
}
provider "newrelic" {
account_id = var.newrelic_account_id
api_key = var.newrelic_api_key
region = "EU"
}
resource "newrelic_notification_destination" "mobile_push_channel" {
account_id = var.newrelic_account_id
name = "monitoring@acme.tld - Mobile Push"
type = "MOBILE_PUSH"
property {
key = "userId"
value = "100444444"
}
}
resource "newrelic_notification_channel" "mobile_push_channel" {
account_id = var.newrelic_account_id
name = "Mobile Push - Monitoring"
type = newrelic_notification_destination.mobile_push_channel.type
destination_id = newrelic_notification_destination.mobile_push_channel.id
product = "IINT"
}
Actual Behavior
The newrelic_notification_channel
required a property
, while using a newrelic_notification_destination
of type MOBILE_PUSH
does not require any, it is therefore impossible to make newrelic_notification_channel
work correctly.
Expected Behavior
The property
block should be optional for the MOBILE_PUSH
type.
Steps to Reproduce
- Use the code above
terraform plain
Debug Output
╷
│ Error: Insufficient property blocks
│
│ on newrelic_notifications.tf line 4, in resource "newrelic_notification_channel" "mobile_push_channel":
│ 4: resource "newrelic_notification_channel" "mobile_push_channel" {
│
│ At least 1 "property" blocks are required.