{"action":"opened","issue":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-newrelic/issues/35","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/35/labels{/name}","comments_url":"https://api.github.com/repos/terraform-providers/terraform-provider-newrelic/issues/35/comments","events_url":"https://api.github.com/repos/terraform-providers/terraform-provider-newrelic/issues/35/events","html_url":"https://github.com/terraform-providers/terraform-provider-newrelic/issues/35","id":344558437,"node_id":"MDU6SXNzdWUzNDQ1NTg0Mzc=","number":35,"title":"newrelic_infra_alert_condition - add support for integration_provider","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},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-25T18:34:21Z","updated_at":"2018-07-25T18:34:21Z","closed_at":null,"author_association":"NONE","body":"### Terraform Version\r\nterraform 0.11.7\r\nnewrelic provider 1.0.1\r\n\r\n### Affected Resource(s)\r\n- newrelic_infra_alert_condition\r\n\r\n### Terraform Configuration Files\r\n```hcl\r\nresource \"newrelic_infra_alert_condition\" \"elb_host_count\" {\r\n  policy_id = \"${newrelic_alert_policy.alerting.id}\"\r\n\r\n  name       = \"ELB Healthy Host Count\"\r\n  enabled    = true\r\n  type       = \"infra_metric\"\r\n  event      = \"LoadBalancerSample\"\r\n  select     = \"provider.healthyHostCount.Average\"\r\n  comparison = \"below\"\r\n  where      = \"(`ec2Tag_environment` = '${var.environment}')\"\r\n\r\n  critical {\r\n    duration      = 10\r\n    value         = 1\r\n    time_function = \"all\"\r\n  }\r\n}\r\n```\r\n\r\n\r\n### Expected Behaviour\r\nThe result should be a `working` alert condition for ELB integration in NewRelic.\r\n\r\n### Actual Behaviour\r\nThe created alert condition doesn't pick up and display the metric from ELB. The displayed graph is empty in contrast to a manually configured alert.\r\n\r\n![image](https://user-images.githubusercontent.com/40232958/43220294-99bcc6e0-9041-11e8-9dfb-e3c86d252bf4.png)\r\n\r\n\r\n### Important Factoids\r\nQuerying the REST API shows that there is a need for additional argument for AWS ELB integration called `integration_provider` which is missing (or not available now ).\r\n\r\n```json\r\n{\r\n  \"data\": [\r\n    {\r\n      \"type\": \"infra_metric\",\r\n      \"name\": \"elb\",\r\n      \"enabled\": true,\r\n      \"filter\": {\r\n        \"and\": [\r\n          {\r\n            \"is\": {\r\n              \"provider.elbTag_environment\": \"prod\"\r\n            }\r\n          }\r\n        ]\r\n      },\r\n      \"id\": 6304632,\r\n      \"created_at_epoch_millis\": 1532542213665,\r\n      \"updated_at_epoch_millis\": 1532542213736,\r\n      \"policy_id\": 287280,\r\n      \"event_type\": \"LoadBalancerSample\",\r\n      \"select_value\": \"provider.healthyHostCount.Average\",\r\n      \"comparison\": \"below\",\r\n      \"critical_threshold\": {\r\n        \"value\": 1,\r\n        \"duration_minutes\": 10,\r\n        \"time_function\": \"all\"\r\n      },\r\n      \"integration_provider\": \"Elb\"\r\n    },\r\n```\r\n\r\n\r\n\r\n\r\n"}}
{"actor":{"display_login":"ConstantinElse"}}