Terraform module to configure and provision Datadog monitors, custom RBAC roles with permissions, Datadog synthetic tests, Datadog child organizations, and other Datadog resources from a YAML configuration, complete with automated tests.
APACHE-2.0 License
Bot releases are visible (Hide)
Published by github-actions[bot] 8 months ago
Note: min_failure_duration
and min_location_failed
are in the API, but are not supported in the Terraform provider v3.36.0, which is current as of this PR opening.
Published by github-actions[bot] 8 months ago
In this release, we preserve backward compatibility, but going forward we only support monitor configurations that are the Terraform equivalent of the JSON used by the Datadog API.
See modules/monitors/README.md for more details.
modules/monitors/README.md
for details)This is an auto-generated PR that updates the README.md and docs
To have most recent changes of README.md and doc from origin templates
Published by github-actions[bot] 12 months ago
synthetics
module:
null-label
tags optionalPublished by github-actions[bot] about 1 year ago
Added support for scheduling_options
Should be used like this:
k8s-no-data-from-cronjob:
type: "query alert"
query: "..."
message: "..."
...
scheduling_options:
- evaluation_window:
- day_starts: "07:00"
Added support for scheduling_options
Rebuild github dir from the template
Published by cloudpossebot over 1 year ago
Published by cloudpossebot about 2 years ago
monitor
when using more then one threshold.Published by cloudpossebot about 2 years ago
slo
module # For each monitor-based SLO, either `monitor_ids` or `monitors` should be provided
# `monitor_ids` is a list of externally created monitors to use for the monitor-based SLO
# If `monitors` map is provided, the monitors will be created by the module and assigned to the SLO
Published by cloudpossebot about 2 years ago
locals {
datadog_monitors = {
test-object-1 = {
name = "test-object-1"
message = "test-object-1"
type = "metric alert"
query = "avg(last_30m):avg:system.load.norm.5{*} by {host} > 2"
require_full_window = true
threshold_windows = {}
thresholds = {
critical = 2
}
}
test-object-2 = {
name = "test-object-2"
message = "test-object-2"
type = "metric alert"
query = "avg(last_30m):avg:system.load.norm.5{*} by {host} > 2"
threshold_windows = {}
thresholds = {
critical = 2
}
}
}
}
│ Error: Inconsistent conditional result types
│
│ on .modules/monitors/main.tf line 9, in resource "datadog_monitor" "default":
│ 9: for_each = local.enabled ? { for k, v in var.datadog_monitors : k => v if lookup(v, "enabled", true) } : {}
│ ├────────────────
│ │ local.enabled is true
│ │ var.datadog_monitors is object with 2 attributes
│
│ The true and false result expressions must have consistent types. The
│ 'true' value includes object attribute "test-object-1", which is absent in
│ the 'false' value.
#58
https://github.com/cloudposse/terraform-datadog-platform/pull/58#discussion_r804290888
locals {
datadog_monitors = {
test-object-1 = {
name = "test-object-1"
message = "test-object-1"
type = "metric alert"
query = "avg(last_30m):avg:system.load.norm.5{*} by {host} > 2"
require_full_window = true
threshold_windows = {}
thresholds = {
critical = 2
}
}
test-object-2 = {
name = "test-object-2"
message = "test-object-2"
type = "metric alert"
query = "avg(last_30m):avg:system.load.norm.5{*} by {host} > 2"
threshold_windows = {}
thresholds = {
critical = 2
}
}
}
}
│ Error: Inconsistent conditional result types
│
│ on .modules/monitors/main.tf line 9, in resource "datadog_monitor" "default":
│ 9: for_each = local.enabled ? { for k, v in var.datadog_monitors : k => v if lookup(v, "enabled", true) } : {}
│ ├────────────────
│ │ local.enabled is true
│ │ var.datadog_monitors is object with 2 attributes
│
│ The true and false result expressions must have consistent types. The
│ 'true' value includes object attribute "test-object-1", which is absent in
│ the 'false' value.
#58
https://github.com/cloudposse/terraform-datadog-platform/pull/58#discussion_r804290888
Published by cloudpossebot about 2 years ago
Published by cloudpossebot over 2 years ago
Published by cloudpossebot over 2 years ago
timeout_h
timeout_h
greater than 24
0
was chosen is because for some monitors 0
is already usedtimeout_h: 0
is used https://github.com/cloudposse/terraform-datadog-platform/blob/ea139d01e4cad78a446552c6174ee7ac3f888c67/catalog/monitors/k8s.yaml#L23
Published by cloudpossebot over 2 years ago
enabled
flag for individual SLOs and Synthetics0:key:value
when wrong type is used.Published by cloudpossebot over 2 years ago
all
to represent all public locations. this filters out fetched private locations.Published by cloudpossebot over 2 years ago
NOTE adding a
minor
label because this is a breaking change
warning_display
and target_display
. These are no longer configurable as of terraform-provider-datadog v3.7.0
╷
│ Error: Value for unconfigurable attributes
│
│ with module.datadog_slos.datadog_service_level_objective.metric_slo["(SLO) Example - Synthetic Checks"],
│ on .terraform/modules/datadog_slos/main.tf line 53, in resource "datadog_service_level_objective" "metric_slo":
│ 53: resource "datadog_service_level_objective" "metric_slo" {
│
│ Can't configure a value for "thresholds.0.warning_display": its value will be decided automatically based on the result of applying this configuration.
╵
╷
│ Error: Value for unconfigurable attribute
│
│ with module.datadog_slos.datadog_service_level_objective.metric_slo["(SLO) Example - Synthetic Checks"],
│ on .terraform/modules/datadog_slos/main.tf line 53, in resource "datadog_service_level_objective" "metric_slo":
│ 53: resource "datadog_service_level_objective" "metric_slo" {
│
│ Can't configure a value for "thresholds.0.target_display": its value will be decided automatically based on the result of applying this configuration.
╵
Releasing state lock. This may take a few moments...
exit status 1
Published by cloudpossebot over 2 years ago
Published by cloudpossebot over 2 years ago
child_organization
outputsPublished by cloudpossebot almost 3 years ago
organization_settings
module and exampledatadog_organization_settings
resource from the child_organization
moduledatadog_organization_settings
for Datadog organizations (including child orgs) must be provisioned using API keys for that organization after the organization itself has been createddatadog_organization_settings
dependencies on the organization API keysPublished by cloudpossebot almost 3 years ago
["all"]
support to enable all (currently) supported DD locations["aws:my-region"]
or ["all"]
Published by cloudpossebot almost 3 years ago
#53
Published by cloudpossebot almost 3 years ago
N/A