{"action":"created","issue":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-newrelic/issues/5","repository_url":"https://api.github.com/repos/terraform-providers/terraform-provider-newrelic","labels_url":"https://api.github.com/repos/terraform-providers/terraform-provider-newrelic/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/terraform-providers/terraform-provider-newrelic/issues/5/comments","events_url":"https://api.github.com/repos/terraform-providers/terraform-provider-newrelic/issues/5/events","html_url":"https://github.com/terraform-providers/terraform-provider-newrelic/issues/5","id":235679798,"node_id":"MDU6SXNzdWUyMzU2Nzk3OTg=","number":5,"title":"provider/newrelic: newrelic_alert_channel continually recreates resources","user":{"login":"hashibot","id":26720499,"node_id":"MDQ6VXNlcjI2NzIwNDk5","avatar_url":"https://avatars1.githubusercontent.com/u/26720499?v=4","gravatar_id":"","url":"https://api.github.com/users/hashibot","html_url":"https://github.com/hashibot","followers_url":"https://api.github.com/users/hashibot/followers","following_url":"https://api.github.com/users/hashibot/following{/other_user}","gists_url":"https://api.github.com/users/hashibot/gists{/gist_id}","starred_url":"https://api.github.com/users/hashibot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hashibot/subscriptions","organizations_url":"https://api.github.com/users/hashibot/orgs","repos_url":"https://api.github.com/users/hashibot/repos","events_url":"https://api.github.com/users/hashibot/events{/privacy}","received_events_url":"https://api.github.com/users/hashibot/received_events","type":"User","site_admin":false},"labels":[{"id":620326680,"node_id":"MDU6TGFiZWw2MjAzMjY2ODA=","url":"https://api.github.com/repos/terraform-providers/terraform-provider-newrelic/labels/bug","name":"bug","color":"f7c6c7","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-06-13T20:18:01Z","updated_at":"2018-07-25T15:51:37Z","closed_at":null,"author_association":"NONE","body":"_This issue was originally opened by @silvamerica as hashicorp/terraform#13401. It was migrated here as part of the [provider split](https://www.hashicorp.com/blog/upcoming-provider-changes-in-terraform-0-10/). The original body of the issue is below._\r\n\r\n<hr>\r\n\r\n### Terraform Version\r\n\r\n0.9.2\r\n\r\n### Affected Resource(s)\r\n\r\n- newrelic_alert_channel\r\n- newrelic_alert_policy_channel\r\n\r\n### Terraform Configuration Files\r\n```hcl\r\nresource \"newrelic_alert_policy\" \"alerting\" {\r\n  name = \"${var.name}-${var.environment}\"\r\n}\r\n\r\nresource \"newrelic_alert_channel\" \"alerting\" {\r\n  name = \"${var.name}-pagerduty-${var.environment}\"\r\n  type = \"pagerduty\"\r\n\r\n  configuration = {\r\n    subdomain = \"${var.subdomain}\"\r\n    service_name = \"${pagerduty_service_integration.newrelic.name}\"\r\n    service_key = \"${pagerduty_service_integration.newrelic.integration_key}\"\r\n  }\r\n}\r\n\r\nresource \"newrelic_alert_policy_channel\" \"alerting\" {\r\n  policy_id  = \"${newrelic_alert_policy.alerting.id}\"\r\n  channel_id = \"${newrelic_alert_channel.alerting.id}\"\r\n}\r\n```\r\n\r\n### Expected Behavior\r\n\r\nNo changes should be detected\r\n\r\n### Actual Behavior\r\n```hcl\r\n-/+ module.alerting.newrelic_alert_channel.alerting\r\n    configuration.%:            \"0\" => \"3\" (forces new resource)\r\n    configuration.service_key:  \"<sensitive>\" => \"<sensitive>\" (forces new resource)\r\n    configuration.service_name: \"<sensitive>\" => \"<sensitive>\" (forces new resource)\r\n    configuration.subdomain:    \"<sensitive>\" => \"<sensitive>\" (forces new resource)\r\n    name:                       \"alerting-pagerduty-production\" => \"alerting-pagerduty-production\"\r\n    type:                       \"pagerduty\" => \"pagerduty\"\r\n\r\n-/+ module.alerting.newrelic_alert_policy_channel.alerting\r\n    channel_id: \"223790\" => \"0\" (forces new resource)\r\n    policy_id:  \"57733\" => \"57733\"\r\n```\r\n\r\nIt seems like the configuration hash might not be being sent from the newrelic API, therefore the newrelic provider thinks it has to re-add it every time."},"comment":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-newrelic/issues/comments/407803268","html_url":"https://github.com/terraform-providers/terraform-provider-newrelic/issues/5#issuecomment-407803268","issue_url":"https://api.github.com/repos/terraform-providers/terraform-provider-newrelic/issues/5","id":407803268,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNzgwMzI2OA==","user":{"login":"ConstantinElse","id":40232958,"node_id":"MDQ6VXNlcjQwMjMyOTU4","avatar_url":"https://avatars3.githubusercontent.com/u/40232958?v=4","gravatar_id":"","url":"https://api.github.com/users/ConstantinElse","html_url":"https://github.com/ConstantinElse","followers_url":"https://api.github.com/users/ConstantinElse/followers","following_url":"https://api.github.com/users/ConstantinElse/following{/other_user}","gists_url":"https://api.github.com/users/ConstantinElse/gists{/gist_id}","starred_url":"https://api.github.com/users/ConstantinElse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ConstantinElse/subscriptions","organizations_url":"https://api.github.com/users/ConstantinElse/orgs","repos_url":"https://api.github.com/users/ConstantinElse/repos","events_url":"https://api.github.com/users/ConstantinElse/events{/privacy}","received_events_url":"https://api.github.com/users/ConstantinElse/received_events","type":"User","site_admin":false},"created_at":"2018-07-25T15:51:37Z","updated_at":"2018-07-25T15:51:37Z","author_association":"NONE","body":"I'm having the same issue with slack channel too:\r\n\r\n```\r\nresource \"newrelic_alert_channel\" \"slack\" {\r\n  name = \"alerts\"\r\n  type = \"slack\"\r\n\r\n  configuration = {\r\n    channel = \"alerts\"\r\n    url     = \"https://hooks.slack.com/services/***********\"\r\n  }\r\n}\r\n```\r\n\r\ngetting all the time:\r\n\r\n```\r\n-/+ newrelic_alert_channel.slack (new resource required)\r\n      id:                    \"1634652\" => <computed> (forces new resource)\r\n      configuration.%:       \"1\" => \"2\" (forces new resource)\r\n      configuration.channel: <sensitive> => <sensitive> (attribute changed)\r\n      configuration.url:     <sensitive> => <sensitive> (forces new resource)\r\n      name:                  \"alerts\" => \"alerts\"\r\n      type:                  \"slack\" => \"slack\"\r\n```\r\n"}}
{"actor":{"display_login":"ConstantinElse"}}