Skip to content

[datadog_dashboard] Add description field to widget definitions#3596

Open
SarthakC wants to merge 1 commit intoDataDog:masterfrom
SarthakC:feature/widget-description
Open

[datadog_dashboard] Add description field to widget definitions#3596
SarthakC wants to merge 1 commit intoDataDog:masterfrom
SarthakC:feature/widget-description

Conversation

@SarthakC
Copy link
Copy Markdown

Summary

Closes #3595

The Datadog dashboard UI supports adding a description to individual widgets (shown as a tooltip on the widget's ? icon). This PR exposes that field in the Terraform provider for all applicable widget definition types.

  • The Datadog REST API already supports description inside each widget's definition JSON object — confirmed via GET /api/v1/dashboard/{id}. The Go API client surfaces it through AdditionalProperties since it's not yet in the typed spec.
  • Added getWidgetDescriptionSchema() helper returning an optional TypeString field
  • Updated 27 widget definition types: schema, buildDatadog*Definition, and buildTerraform*Definition for each
  • Skipped container widgets (group, powerpack, split_graph) and text-only widgets (note, free_text)

Example usage:

widget {
  query_value_definition {
    title       = "Active Users"
    description = "Unique users who had at least one session in the selected time window."
    request { ... }
  }
}

Affected widget types

alert_graph, alert_value, change, check_status, distribution, event_stream, event_timeline, geomap, heatmap, hostmap, image, list_stream, log_stream, manage_status, query_table, query_value, run_workflow, scatterplot, service_level_objective, servicemap, slo_list, timeseries, toplist, topology_map, trace_service, treemap, sunburst

Test plan

  • Run acceptance test for datadog_dashboard with a query_value_definition that includes a description
  • Verify terraform apply sets the description on the widget in the Datadog UI
  • Verify terraform plan shows no drift when description is set
  • Verify existing dashboards without descriptions continue to work

🤖 Generated with Claude Code

Expose the `description` attribute on all applicable dashboard widget
definition types. The Datadog API stores this as an extra field in the
widget definition JSON (returned as a tooltip via the widget's ? icon
in the UI), which the Go client surfaces via AdditionalProperties.

Fixes DataDog#3595

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@SarthakC SarthakC requested a review from a team as a code owner March 11, 2026 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Support widget description field in dashboard widget definitions

1 participant