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

New 10m default for no_data_timeframe causes permanent diff when notify_no_data is not explicitly set #369

Closed
2rs2ts opened this issue Dec 16, 2019 · 9 comments

Comments

@2rs2ts
Copy link

2rs2ts commented Dec 16, 2019

Terraform Version

Terraform v0.11.8
+ provider.datadog v2.5.0
+ provider.pagerduty v1.4.1

Your version of Terraform is out of date! The latest version
is 0.12.18. You can update by downloading from www.terraform.io/downloads.html

Affected Resource(s)

Please list the resources as a list, for example:

  • datadog_monitor

Terraform Configuration Files

resource "datadog_monitor" "mymonitor" {
  name  = "myname"
  query = "max(last_1m):max:haproxy.frontend.session.pct by {datacenter,host} > 70"

  type = "query alert"

  message = "mymessage"

  thresholds {
    critical = 70
    warning  = 50
  }

  new_host_delay = 300

  tags = ["mytag"]
}

Debug Output

Going to omit this if possible. I do not want to give away any sensitive info. Reproducing this should be pretty easy though.

Panic Output

N/A

Expected Behavior

Since notify_no_data is not set and its default is false, no_data_timeframe should not show up on any diffs.

Actual Behavior

This diff persists:

  ~ module.mymodule.module.mysubmodule.datadog_monitor.mymonitor
      no_data_timeframe:              "0" => "10"

Explicitly setting no_data_timeframe = 0 makes this diff go away.

Steps to Reproduce

  1. terraform apply
  2. terraform plan

Important Factoids

N/A probably

References

@2rs2ts
Copy link
Author

2rs2ts commented Dec 16, 2019

Oh I just discovered something, I think if you explicitly set notify_no_data this diff doesn't happen and datadog stores the 10 minutes in the UI even though it's set to not notify.

edit: this only seems to be the case for some of my older monitors which have always had it explicitly set to false. Adding it to others seems to not work.

@2rs2ts 2rs2ts changed the title New 10m default for no_data_timeframe causes permanent diff New 10m default for no_data_timeframe causes permanent diff when notify_no_data is not explicitly set Dec 16, 2019
@xp-1000
Copy link

xp-1000 commented Jan 14, 2020

Hello,

it seems to come from a recent API change from Datadog side.

It is true https://github.com/terraform-providers/terraform-provider-datadog/pull/212 is the (indirect) cause but this was not true when this has been implemented and merged.

In my opinion, Datadog should take care of testing and updating their own official provider when they change their API (or at least communicate on these changes before to allow us to anticipate).

@jurajseffer
Copy link
Contributor

When notify_no_data is set to false, setting no_data_timeframe to 0 gets rid of the permanent diff from the plan. There will be an initial difference in old and new monitors showed in the plan though.

@phillip-dd
Copy link
Contributor

@calebtote
Copy link

When notify_no_data is set to false, setting no_data_timeframe to 0 gets rid of the permanent diff from the plan. There will be an initial difference in old and new monitors showed in the plan though.

Interestingly, if you set it to 10, the permanent diff remains.

@adrienbroyere
Copy link

Upgrading the Datadog provider to 2.6.0 solved the issue for me.

See #384

@bkabrda
Copy link
Contributor

bkabrda commented Feb 4, 2020

Hey @2rs2ts did 2.6.0 resolve the issue for you as well?

@bkabrda
Copy link
Contributor

bkabrda commented Feb 6, 2020

Ok, since I can't reproduce this any more (using 2.6.0 provider version), I'm going to close this issue. Feel free to open a new issue if this still hits you. Thanks!

@bkabrda bkabrda closed this as completed Feb 6, 2020
@2rs2ts
Copy link
Author

2rs2ts commented Feb 26, 2020

Hey folks, sorry that it took me a while to reply. Was really busy. I just confirmed that I don't see this issue anymore! Thanks a bunch.

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

7 participants