terraform-provider-datadogpagerduty

command module
v0.0.0-...-6d8be29 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2020 License: MPL-2.0 Imports: 2 Imported by: 0

README

⚠ This provider should no longer be used now that the datadog_integration_pagerduty_service_object resource resource is available in the official Datadog provider. No further updates will be made to this provider.

Terraform Provider

Custom provider which allows per service configuration of the DataDog PagerDuty integration.

This is a stop gap till something like this gets merged into the main client.

Sample Usage

provider "pagerduty" {
  token = "aaaaaa"
}

provider "datadog" {
  api_key = "bbbbbb"
  app_key = "cccccc"
}

provider "datadogpagerduty" {
  api_key = "bbbbbb"
  app_key = "cccccc"
}

data "pagerduty_vendor" "datadog" {
  name = "Datadog"
}

resource "pagerduty_service" "alert_query_service" {
  name                    = "Another Alert Query Service"
  auto_resolve_timeout    = 14400
  acknowledgement_timeout = 600
  escalation_policy       = "P2EUG11"
  alert_creation          = "create_alerts_and_incidents"
}

resource "pagerduty_service_integration" "alert_query_service_datadog" {
  name    = "${data.pagerduty_vendor.datadog.name}"
  service = "${pagerduty_service.alert_query_service.id}"
  vendor  = "${data.pagerduty_vendor.datadog.id}"
}

resource "datadogpagerduty_service_integration" "pd_aqs" {
  service_name = "AnotherAlertQueryServices"
  service_key  = "${pagerduty_service_integration.alert_query_service_datadog.integration_key}"
}

resource "datadog_monitor" "foo" {
  name                = "Monitor for AnotherAQS"
  type                = "metric alert"
  message             = "Monitor triggered.  Notify: ${datadog_pagerduty_service_integration.pd_aqs.notify_handle}"
  query               = "avg(last_1h):avg:aws.ec2.cpuutilization{*} > 50"
  notify_no_data      = false
  require_full_window = false
  tags                = ["terraform:true"]
}

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL