Requesting the addition of a cost alert monitor type in Datadog's Terraform provider. This would simplify setting up cost-related alerts directly through Terraform.
Use Case: Monitoring cloud spending is important for budget management. A dedicated cost alert type in Terraform would streamline the process, making it easier to set thresholds and detect anomalies.
Benefits:
Easier configuration for cost-related alerts using terraform.
resource "datadog_monitor" "cost_alert" {
name = "Monthly Cost Alert"
type = "cost alert"
query = formula("sum:gcp.cost.amortized{*}.rollup(sum, 86400)").last("30d").change("absolute") > 10000
message = <<EOT
Alert: Monthly cost threshold exceeded for project {{project_name}}.
{{#is_alert}}
- Investigate recent changes in resource usage or configurations.
- The total cost has exceeded $5000 in the last 30 days.
- Current Cost: {{value}}
{{/is_alert}}
{{#is_no_data}}
Cost data is missing.
- Check if the billing export is functioning correctly.
- Verify if there are any service disruptions in GCP or Datadog.
- Ensure that the monitor's query is still valid.
{{/is_no_data}}
EOT
thresholds {
critical = 5000
}
}
Conclusion: Adding a cost alert monitor type to Datadog's Terraform provider would enhance cloud cost management, making it easier to set up and manage cost-related alerts within IaC workflows.
What resources or data sources are affected?
Feature Request
Requesting the addition of a
cost alert
monitor type in Datadog's Terraform provider. This would simplify setting up cost-related alerts directly through Terraform.Use Case: Monitoring cloud spending is important for budget management. A dedicated
cost alert
type in Terraform would streamline the process, making it easier to set thresholds and detect anomalies.Benefits:
Conclusion: Adding a cost alert monitor type to Datadog's Terraform provider would enhance cloud cost management, making it easier to set up and manage cost-related alerts within IaC workflows.
References