Terraform-provider-newrelic: TF_LOG=DEBUG hangs provider

Created on 31 Oct 2019  路  9Comments  路  Source: newrelic/terraform-provider-newrelic

Terraform Version

Terraform v0.12.12

  • provider.newrelic v1.5.2

Affected Resource(s)

Please list the resources as a list, for example:

  • newrelic_alert_policy_channel

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

provider newrelic {
  api_key = "xxxxxxxxxxxxxxxxxxxxxxxxx"
}

resource newrelic_alert_policy policy {
  name = "policy"
}

resource newrelic_alert_channel alerting {
  name = "PagerDuty"
  type = "pagerduty"

  configuration = {
    service_name = "New Relic"
    service_key = "xxxxxxxxxxxxxxxxxxxxxxxxx"
  }
}

resource newrelic_alert_policy_channel alerting {
  policy_id  = newrelic_alert_policy.policy.id
  channel_id = newrelic_alert_channel.alerting.id
}

Debug Output

2019/10/31 20:04:29 [TRACE] dag/walk: vertex "provider.newrelic (close)" is waiting for "newrelic_alert_policy_channel.alerting"
2019/10/31 20:04:34 [TRACE] dag/walk: vertex "provider.newrelic (close)" is waiting for "newrelic_alert_policy_channel.alerting"
2019/10/31 20:04:39 [TRACE] dag/walk: vertex "provider.newrelic (close)" is waiting for "newrelic_alert_policy_channel.alerting"
2019/10/31 20:04:44 [TRACE] dag/walk: vertex "provider.newrelic (close)" is waiting for "newrelic_alert_policy_channel.alerting"
2019/10/31 20:04:49 [TRACE] dag/walk: vertex "provider.newrelic (close)" is waiting for "newrelic_alert_policy_channel.alerting"

is printed indeinitely at end of run.. every 5 seconds.

Expected Behavior

terraform does not hang and completes normally.

Actual Behavior

What actually happened?

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. update provider.api_key. newrelic_alert_channel.configuration.service_key can be set to any value.
  2. terraform apply - completes normally
  3. terraform plan - now hanging
  4. terraform state rm newrelic_alert_policy_channel.alerting - remove policy channel from state to recover
  5. terrafrom plan - now works
  6. repeat from step 2
bug

Most helpful comment

So I had a chance to follow up and was able to complete all my terraform code without issues.

Fantastic work guys, thank you.

Next I'll be able to create reusable modules for my monitoring..

All 9 comments

@morganchristiansson I am having trouble reproducing this error. Can you reach out to [email protected] where they will gather some more context about your issue?

It happens when setting TF_LOG=debug in above example. It's plain terraform apply is just re-creating the resources now. Pretty sure that hung too previously.

As part of larger terraform it hangs in refresh state.

I will open another case with support for this.

I would just like to add that I see this issue when TF_LOG is set to anything except an empty string

Hi there, just wanted to touch base. Expect some traction on this coming up over next week or two. We're in the process of migrating the provider to our new Go client, newrelic-client-go, which will hopefully resolve this.

Using the latest provider and the example above, with TF_LOG=DEBUG set, I do not get hangs following the steps listed above. @morganchristiansson are you still seeing this issue?

Also confirming that I cannot reproduce the issue anymore. We've made a lot of updates since this was filed. Since we haven't heard back in a while, we can only assume this is no longer an issue for you. If you come across this bug again, please feel free to open a new issue with steps to reproduce. Thanks for taking the time to report.

I've not had chance to confirm it's fixed sorry - but I have seen all the work you've been putting in and planning to use more shortly. Thanks guys!

So I had a chance to follow up and was able to complete all my terraform code without issues.

Fantastic work guys, thank you.

Next I'll be able to create reusable modules for my monitoring..

Great to hear, thanks for circling back. We've also started an initial reusable module and would love feedback on it, or if you have reusable use-cases for us to look at. You can find the official module here: https://registry.terraform.io/modules/newrelic/apm/newrelic/ (or on GitHub: https://github.com/newrelic/terraform-newrelic-apm/ )

Was this page helpful?
0 / 5 - 0 ratings