Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to monitors outside terraform breaks plan/apply #31

Closed
jdpaton opened this issue Nov 3, 2017 · 7 comments
Closed

Updates to monitors outside terraform breaks plan/apply #31

jdpaton opened this issue Nov 3, 2017 · 7 comments

Comments

@jdpaton
Copy link

jdpaton commented Nov 3, 2017

Terraform Version

Terraform v0.9.11

Affected Resource(s)

Please list the resources as a list, for example:

  • datadog_monitor

Expected Behavior

After a monitor was manually updated in the datadog web UI, its parameters should have been overwritten by any terraform apply.

Actual Behavior

It failed at the plan stage on a null reference.

Steps to Reproduce

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

  1. Create a monitor with the terraform datadog provider
  2. In the datadog web UI, edit the monitor to change something, in this case thresholds.
  3. Try to run the terraform plan again and it will give an error like:

* module.monitoring.datadog_monitor.frontend_error_rate_percent: 1 error(s) occurred:

* module.monitoring.datadog_monitor.frontend_error_rate_percent: datadog_monitor.frontend_error_rate_percent: strconv.ParseInt: parsing "null": invalid syntax
* module.monitoring.datadog_monitor.frontend_response_time_2xx_p99: 1 error(s) occurred:

* module.monitoring.datadog_monitor.frontend_response_time_2xx_p99: datadog_monitor.frontend_response_time_2xx_p99: strconv.ParseInt: parsing "null": invalid syntax
@dtan4
Copy link

dtan4 commented Nov 6, 2017

I got the same error... this patch zorkian/go-datadog-api#129 may fix this problem.

@philwhln
Copy link

philwhln commented Nov 9, 2017

I'm hitting an issue with this to. If Do not notify if data is missing is configured then no_data_timeframe is null and it seems that terraform is expecting an Int here and so croaks.

{
	"options": {
		"no_data_timeframe": null,
strconv.ParseInt: parsing "null": invalid syntax

This happens on terraform import or terraform plan.

btw, hi @jdpaton! Hope things are going well :)

@nagas
Copy link

nagas commented Nov 23, 2017

+1

@ojongerius
Copy link
Contributor

Heads up; I've just merged zorkian/go-datadog-api#129.

@ojongerius
Copy link
Contributor

FYI: Merge has been included in release https://github.com/zorkian/go-datadog-api/releases/tag/v2.6

paddycarver added a commit that referenced this issue Dec 6, 2017
Update our vendored version of gopkg.in/zorkian/go-datadog-api.v2 to use
the version 2.6 release, which has the fix we need for #31.
@catsby
Copy link
Contributor

catsby commented Dec 6, 2017

Fixed in #34 , I'll cut release 1.0.1 of this provider shortly

@catsby catsby closed this as completed Dec 6, 2017
@catsby
Copy link
Contributor

catsby commented Dec 6, 2017

v1.0.1 version is out: https://releases.hashicorp.com/terraform-provider-datadog/1.0.1/

Running terraform init should pull down the new version, unless you have it pinned

nitrocode pushed a commit to nitrocode/terraform-provider-datadog that referenced this issue Nov 3, 2018
Update our vendored version of gopkg.in/zorkian/go-datadog-api.v2 to use
the version 2.6 release, which has the fix we need for DataDog#31.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants