terraform-datadog-platform

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

Stars
103
Committers
19

Bot releases are visible (Hide)

terraform-datadog-platform - v1.4.1 Align monitor support with Datadog REST API Latest Release

Published by github-actions[bot] 8 months ago

🐛 Bug Fixes

what

  • Add additional options to monitor configuration

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.

why

  • Follow-up to #87 which left some options out by mistake

references

terraform-datadog-platform - v1.4.0 Align monitor support with Datadog REST API

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.

🚀 Enhancements

what

  • Update the monitors support to support all current features supported by the Datadog terraform provider
  • Revise the input to match the Datadog API model (see modules/monitors/README.md for details)

why

  • Module did not support several current features
  • Make it easy to use the Datadog Web Console to create and edit monitors, then convert the exported JSON to input to this module

references

🤖 Automatic Updates

what

This is an auto-generated PR that updates the README.md and docs

why

To have most recent changes of README.md and doc from origin templates

terraform-datadog-platform - v1.3.0

Published by github-actions[bot] 12 months ago

what

  • For all modules:
    • Remove dependency on Terraform AWS provider
    • Update Terraform requirement to v1.0.0
  • Enhance the synthetics module:
    • Accept tests defined according to the schema of the Datadog API outputs
    • Make addition of null-label tags optional

why

  • Nothing in the modules needs or is specific to AWS
  • Terraform has been in General Release (v1.0.0) for long enough to drop support for pre-release versions
  • Make it easy to create and modify tests using the Datadog web UI and then maintain them via Terraform
  • Better control of tagging

references

terraform-datadog-platform - v1.2.0

Published by github-actions[bot] about 1 year ago

what

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"

why

Added support for scheduling_options

references

Rebuild github dir from the template

terraform-datadog-platform - v1.1.0

Published by cloudpossebot over 1 year ago

  • No changes
terraform-datadog-platform - v1.0.1

Published by cloudpossebot about 2 years ago

🚀 Enhancements

what

  • lookup function did not pull the correct value required for thresholds, and instead went to the default.
    • This resulted in an error when creating an SLO of type monitor when using more then one threshold.

why

  • We are creating all of our metrics, monitors, SLOs, etc with IaC, using cloud posse's modules (thanks!)
terraform-datadog-platform - v1.0.0

Published by cloudpossebot about 2 years ago

what

  • Refactor slo module
  • Update monitor-based SLOs to be able to create corresponding monitors
  • Add example of monitor-based SLO
  • Update README

why

  • Separate metric-based SLOs and monitor-based SLOs into different files for readability
  • When creating monitor-based SLOs, allow specifying and creating the corresponding monitors and assigning them to the SLOs (in YAML config for each SLO)
  # 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

references

terraform-datadog-platform - v0.32.4

Published by cloudpossebot about 2 years ago

🚀 Enhancements

what

  • Fixes the error where terraform expects both sides of ternary to be same complex type/elements.

why

  • When adding multiple monitors with different requirements, terraform complains that the object does not match throughout the compiled map.
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.

references

🐛 Bug Fixes

what

  • Fixes the error where terraform expects both sides of ternary to be same complex type/elements.

why

  • When adding multiple monitors with different requirements, terraform complains that the object does not match throughout the compiled map.
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.

references

terraform-datadog-platform - v0.32.3

Published by cloudpossebot about 2 years ago

🚀 Enhancements

what

  • aws provider is not being used

why

  • adds an extra entry into my lockfile
terraform-datadog-platform - v0.32.2

Published by cloudpossebot over 2 years ago

🚀 Enhancements

what

  • Update monitor tags
  • Update README

why

  • Monitor tags were incorrect in the examples
  • Monitor tags were incorrect in the README
terraform-datadog-platform - v0.32.1

Published by cloudpossebot over 2 years ago

🚀 Enhancements

what

  • Use a valid default for timeout_h

why

  • Fixes datadog's deprecation of timeout_h greater than 24
  • Reason why 0 was chosen is because for some monitors 0 is already used

references

terraform-datadog-platform - v0.32.0

Published by cloudpossebot over 2 years ago

what

  • enabled flag for individual SLOs and Synthetics
  • Consistent Tag Methodology - A map is passed in and turned into an array via the module (which is what DD provider needs)

why

  • new features and consistency.
    • Tagging consistency fixes bug where tags show up 0:key:value when wrong type is used.
terraform-datadog-platform - v0.31.0

Published by cloudpossebot over 2 years ago

what

  • Datadog Synthetics should use location all if they want all public locations.
  • Datadog Synthetics should use the var locations via remote state to append private locations

why

  • The datadog datasource always fetches all available locations including all private locations. this means we could test an internal to 1 cluster address from all cluster private locations. Instead we want all to represent all public locations. this filters out fetched private locations.
terraform-datadog-platform - v0.30.0

Published by cloudpossebot over 2 years ago

🐛 Bug Fixes

NOTE adding a minor label because this is a breaking change

what

why

 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

references

terraform-datadog-platform - v0.29.0

Published by cloudpossebot over 2 years ago

what

  • Sets enabled flag on monitors to provide a way (with inheritance) to enable / disable a monitor

why

  • Useful to turn off particular monitors based on inheritance
terraform-datadog-platform - v0.28.1

Published by cloudpossebot over 2 years ago

🚀 Enhancements

what

  • Fix child_organization outputs

why

  • Those outputs are not objects, but lists of objects with one item

references

terraform-datadog-platform - v0.28.0

Published by cloudpossebot almost 3 years ago

what

  • Add organization_settings module and example
  • Remove datadog_organization_settings resource from the child_organization module

why

  • datadog_organization_settings for Datadog organizations (including child orgs) must be provisioned using API keys for that organization after the organization itself has been created
  • A child org is created in the context of the root org using the root org's API key, while a child org's settings are provisioned using the child org's API keys
  • Creating a child org and updating its settings is a two-step process and needs to be handled by two different modules and components due to datadog_organization_settings dependencies on the organization API keys
terraform-datadog-platform - v0.27.0

Published by cloudpossebot almost 3 years ago

what

  • Adding a var for public locations that includes ["all"] support to enable all (currently) supported DD locations

why

  • if not using private locations we should enable passing ["aws:my-region"] or ["all"]
terraform-datadog-platform - v0.26.1

Published by cloudpossebot almost 3 years ago

🚀 Enhancements

what

  • match synthetics to monitors, where tags are now an array from map

why

  • Allows us to merge tags from yaml and insert them into synthetics via DD Format

references

#53

terraform-datadog-platform - v0.26.0

Published by cloudpossebot almost 3 years ago

what

  • Use monitor tags as a map instead of a list

why

  • Consistent with terraform tags

references

N/A

Related Projects