You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
resource "datadog_monitor" "example_monitor_1" {
name = "TEST Simple test monitor 1"
type = "metric alert"
message = "Sample monitor to get auto-resolving on no data working. Was created with timeout_h"
resource "datadog_monitor" "example_monitor_2" {
name = "TEST Simple test monitor 2"
type = "metric alert"
message = "Sample monitor to get auto-resolving on no data working. Was not created with timeout_h"
When the monitors were first created the first monitor should have had the setting If a group stops reporting data, resolve after enabled and set to 0.
When I updated the second monitor to also have the timeout_h it should have then added the field to that monitor too.
Actual Behavior
Even though the first monitor said it was going to add timeout_h in the plan, the actual monitor does not have the relevant flag set (image below)
Adding the timeout_h flag to the existing monitor results in no changes listed when you run terraform plan. This was how I first discovered the issues with this field.
Steps to Reproduce
For the first part of the issue, running terraform apply and creating a monitor as described above will show the issue.
For the second part of the issue, running terraform plan when a monitor already exists and you've just added the timeout_h field will show the issue.
Important Factoids
I'm using terraform enterprise, I believe version v202406-1.
References
No response
The text was updated successfully, but these errors were encountered:
Datadog Terraform Provider Version
v3.46.0
Terraform Version
1.6.6
What resources or data sources are affected?
resource_datadog_monitor
Terraform Configuration Files
resource "datadog_monitor" "example_monitor_1" {
name = "TEST Simple test monitor 1"
type = "metric alert"
message = "Sample monitor to get auto-resolving on no data working. Was created with timeout_h"
query = "avg(last_5m):avg:aws.applicationelb.target_response_time.p99{ingress.k8s.aws/stack:service-name/service-name-dev-ingress, region:us-west-2} > 2"
monitor_thresholds {
warning = 1
critical = 2
}
notify_no_data = false
renotify_interval = 60
evaluation_delay = 0
timeout_h = 0
tags = local.no_alert_tags
}
resource "datadog_monitor" "example_monitor_2" {
name = "TEST Simple test monitor 2"
type = "metric alert"
message = "Sample monitor to get auto-resolving on no data working. Was not created with timeout_h"
query = "avg(last_5m):avg:aws.applicationelb.target_response_time.p99{ingress.k8s.aws/stack:service-name/service-name-dev-ingress, region:us-west-2} > 2"
monitor_thresholds {
warning = 1
critical = 2
}
notify_no_data = false
renotify_interval = 60
evaluation_delay = 0
tags = local.no_alert_tags
}
Relevant debug or panic output
Initial
terraform plan
when neither monitor existed: https://gist.github.com/annedroiid/7d52b5085c1e6dec931c5490ba9ea834Output from running
terraform plan
after addingtimeout_h
to the second monitor above: https://gist.github.com/annedroiid/ca9579e3a06c0412f40e53e17b426184Expected Behavior
When the monitors were first created the first monitor should have had the setting
If a group stops reporting data, resolve after
enabled and set to 0.When I updated the second monitor to also have the
timeout_h
it should have then added the field to that monitor too.Actual Behavior
Even though the first monitor said it was going to add
timeout_h
in the plan, the actual monitor does not have the relevant flag set (image below)Adding the
timeout_h
flag to the existing monitor results in no changes listed when you run terraform plan. This was how I first discovered the issues with this field.Steps to Reproduce
For the first part of the issue, running terraform apply and creating a monitor as described above will show the issue.
For the second part of the issue, running terraform plan when a monitor already exists and you've just added the
timeout_h
field will show the issue.Important Factoids
I'm using terraform enterprise, I believe version
v202406-1
.References
No response
The text was updated successfully, but these errors were encountered: