Sample of
Templating Datadog Monitor using Terraform Datadog Provider
- Write the Datadog Monitor message in "here document"
- Manage notification in groups
├── README.md
├── datadog_key.auto.tfvars # api keys
├── datadog_monitor.auto.tfvars # define notify group
├── datadog_monitor.tf # define provider
├── datadog_monitor_template.tf # define template
├── monitor_ec2_sample.tf # monitor sample
└── templates
├── message.tmpl # message common part sample
└── notify.tmpl # message notification part sample
$ git clone https://github.com/htnosm/tf-dd-prov-monitor-template.git
$ cd tf-dd-prov-monitor-template
Input Your Datadog API Key & Application Key.
$ terraform init
# Check the terraform plan command ends successfull.
$ terraform plan
Edit various files according to the purpose.
- e.g.)
- Edit datadog_monitor.auto.tfvars to define a notification group
- Edit templates/message.tmpl to notification body template
- Edit templates/notify.tmpl to notification template
- Add * .tf and increase various definitions