https://github.com/claranet/terraform-datadog-integrations
Manage Datadog integrations with terraform dedicated modules.
https://github.com/claranet/terraform-datadog-integrations
claranet datadog monitoring terraform
Last synced: about 2 months ago
JSON representation
Manage Datadog integrations with terraform dedicated modules.
- Host: GitHub
- URL: https://github.com/claranet/terraform-datadog-integrations
- Owner: claranet
- License: apache-2.0
- Created: 2019-09-16T08:30:35.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-02-19T16:36:50.000Z (3 months ago)
- Last Synced: 2025-03-28T00:34:15.431Z (2 months ago)
- Topics: claranet, datadog, monitoring, terraform
- Language: HCL
- Homepage:
- Size: 117 KB
- Stars: 5
- Watchers: 28
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Datadog Integrations
[](CHANGELOG.md) [](NOTICE) [](LICENSE) [](https://git.fr.clara.net/claranet/pt-monitoring/projects/datadog/terraform/integrations/commits/master)This repository aims to help to configure [Datadog](https://www.datadoghq.com/) integrations using [Terraform](https://www.terraform.io/) modules.
## Important notes
* This repository provide multiple Terraform modules which could be imported, you must choose the one(s) you need.
* Each module should be usable by default but you should be able to configure some specicities if you need.
* You will find a complete `README.md` on each module, explaining how to use it.## Getting started
### Versions
Here is the minimum versions required to use these modules of integrations.
```
required_providers {
datadog = {
source = "DataDog/datadog"
version = ">= 3.0.0"
}
}
required_version = ">= 0.12.31"
}```
_Note_: if you want to use Datadog provider v2 so you need to use version 3 of this repository.
### DataDog provider
Here is the last tested terraform provider version for datadog but next versions should work too.
```
provider "datadog" {api_key = var.datadog_api_key
app_key = var.datadog_app_key
}```
Both of the `datadog_api_key` and `datadog_app_key` are unique to the each datadog account. You can define them in `terraform.tfvars` file:
```
datadog_api_key = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
datadog_app_key = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
```### Variables
Some variables need to be declared.
```
variable "environment" {
type = string
default = "dev"
}variable "datadog_api_key" {
type = string
}variable "datadog_app_key" {
type = string
}```
### Modules declaration example
```
# integrations modules to declare ...
module "datadog-my-integration" {
source = "claranet/integrations/datadog//my/integration/set"
version = "{revision}"# Rest of configuration will depends on each module, please see its README.md
}```
* Replace `{revision}` to the last git tag available on this repository.
* The `//` is very important, it's a terraform specific syntax used to separate git url and folder path.
* `my/integration` represents the path to an integration directory listed below.## Contributions
Contributions are always welcome.
The easiest way is to fork the repository, duplicate a module as "template" and work on it.
An internal CI will run the `auto_update.sh` script to compare with proposed changes and check if everything is up to date.
So, when PR is ready you will need to run this script and push its changes to pass the CI, see [scripts repository](https://github.com/claranet/terraform-datadog-scripts/) for more information.
For example, this will regenerate every READMEs thanks to [terraform-docs](https://github.com/segmentio/terraform-docs) currently in v0.9.1.
## Integrations summary
- [alerting](https://github.com/claranet/terraform-datadog-integrations/tree/master/alerting/)
- [pagerduty](https://github.com/claranet/terraform-datadog-integrations/tree/master/alerting/pagerduty/)
- [cloud](https://github.com/claranet/terraform-datadog-integrations/tree/master/cloud/)
- [aws](https://github.com/claranet/terraform-datadog-integrations/tree/master/cloud/aws/)
- [gcp](https://github.com/claranet/terraform-datadog-integrations/tree/master/cloud/gcp/)
- [database](https://github.com/claranet/terraform-datadog-integrations/tree/master/database/)
- [mysql](https://github.com/claranet/terraform-datadog-integrations/tree/master/database/mysql/)