The `pulumi-datadog` Python package provides a way to declare, deploy, and manage Datadog resources like monitors, dashboards, and integrations using Pulumi's Infrastructure as Code framework. It mirrors the upstream Datadog Terraform Provider and typically releases new versions in sync with updates to that provider. The library is actively maintained and currently at version 5.1.0.
pip install pulumi-datadogVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to configure the `pulumi-datadog` provider and create a simple Datadog metric alert monitor. It assumes `DD_API_KEY` and `DD_APP_KEY` environment variables are set or configured as Pulumi secrets. The `apiUrl` configuration is important and must not end with `/api/`.
Review the official Pulumi Datadog documentation for migration guides and compare your resource definitions against the latest schema. Pay close attention to changes in required/optional fields, data types, and resource naming conventions.
Always provide both `apiKey` and `appKey` for the provider. It is highly recommended to set these using Pulumi's secret management (e.g., `pulumi config set datadog:apiKey --secret`) or environment variables (`DD_API_KEY`, `DD_APP_KEY`) rather than hardcoding them.
Ensure that your `apiUrl` configuration or `DD_HOST` environment variable is in the format `https://api.datadoghq.com/` (or `https://api.datadoghq.eu/`, etc.) without `/api/` at the end.
For resources managed by Pulumi, avoid manual modifications in the Datadog UI. If drift occurs, you can either import the manually changed resource into Pulumi state (if it was created manually) or accept the Pulumi `update` to revert the changes in Datadog to match your code.