Datadog Agent and Terraform: Can Agent settings be fully controlled via Terraform variables?
0 reputation · 23 Mar 2023, 14:08 UTC
Goal: Define a repeatable development environment in which the Datadog Agent’s configuration (API key, site, tags, autodiscovery rules, and resource limits) is expressed entirely through Terraform variables, eliminating the need for manual edits to datadog.yaml or ad‑hoc environment variable files.
Uncertainty: While the Datadog Terraform provider exposes resources for installing the Agent and setting common environment variables, it is unclear whether all Agent settings—particularly autodiscovery configurations, custom check definitions, and advanced eBPF features—can be overridden solely via provider arguments or if they still require mounting a configuration file or relying on host‑level env vars. Additionally, handling of secrets such as DD_API_KEY within a Terraform workflow raises questions about secret management integration and version compatibility between the provider release and the Agent binary used in the dev environment.
- Which Agent configuration parameters can be set exclusively through Terraform provider arguments without requiring a custom
datadog.yamlmount? - Can autodiscovery rules and custom checks be fully managed via Terraform, or do they necessitate file‑based configuration?
- How should sensitive values like
DD_API_KEYbe supplied to the Agent in a repeatable Terraform‑driven workflow while avoiding hard‑coding in configuration files?