Formae plugin for managing Datadog resources.
| Resource Type | Description |
|---|---|
DATADOG::Monitoring::Monitor |
Monitors (metric, query, composite alerts) |
DATADOG::Monitoring::SLO |
Service Level Objectives (metric, monitor types) |
DATADOG::Monitoring::DowntimeSchedule |
Downtime schedules (one-time, recurring) |
DATADOG::Logs::Index |
Logs indexes (filter, exclusion filters, retention) |
DATADOG::Logs::Metric |
Log-based metrics (count, distribution aggregations) |
DATADOG::Logs::Archive |
Logs archives (S3, GCS, Azure destinations) |
DATADOG::IAM::Role |
Custom roles with permission management |
DATADOG::IAM::Team |
Teams (name, handle, description) |
DATADOG::Security::MonitoringRule |
Security monitoring detection rules |
DATADOG::Dashboard::Dashboard |
Dashboards (discovery-first, raw JSON widgets) |
DATADOG::Synthetics::Test |
Synthetics API tests (discovery-first, raw JSON config) |
DATADOG::Logs::Pipeline |
Logs pipelines (typed fields + raw JSON processors) |
Configure a Datadog target in your Forma file:
import "@formae/formae.pkl"
import "@datadog/datadog.pkl"
new formae.Target {
label = "datadog-target"
namespace = "DATADOG"
config = new datadog.Config {
apiKey = datadogApiKey.res.secretValue
appKey = datadogAppKey.res.secretValue
site = "datadoghq.com"
}
}Both keys accept a resolvable, so they can be sourced from a formae-managed secret as above. The agent resolves them live before every call, so onboarding an account or rotating a key needs no agent restart, and the key is stored as a reference rather than sitting in the target config.
A declared key is used as given: one that resolves to an empty value is an error rather than a silent fall back, which would otherwise authenticate as whoever the environment names.
Each key falls back independently, so omit either one to take it from the environment instead:
export DD_API_KEY="your-api-key"
export DD_APP_KEY="your-application-key"
export DD_SITE="datadoghq.com" # or us5.datadoghq.com, etc.See examples/ for usage patterns:
basic/- CPU usage monitor with warning and critical thresholds
FSL-1.1-ALv2