This template provisions and manages Datadog users using Terraform and a GitLab CI/CD pipeline.
- Add and manage Datadog users via Terraform
- GitLab CI/CD pipeline with stages:
validate
β syntax and config checksplan
β preview changesapply
β manual approval for user changes
- Role assignment support (
ro
,st
,adm
, etc.) - Outputs managed user emails
-
Generate Datadog API & Application keys:
- Go to Integrations β APIs in Datadog dashboard
- Create an API key and an Application key
-
Add them to GitLab CI/CD Variables:
TF_VAR_datadog_api_key
β API keyTF_VAR_datadog_app_key
β Application key
- Push or merge β GitLab CI/CD runs Terraform validation and plan
- Manual
apply
stage β applies user changes to Datadog
cd terraform
terraform init
terraform plan
terraform apply