Skip to content

Latest commit

 

History

History
97 lines (69 loc) · 3.12 KB

File metadata and controls

97 lines (69 loc) · 3.12 KB
page_title grafana_apps_dashboard_dashboard_v2 Resource - terraform-provider-grafana
subcategory Grafana Apps
description Manages Grafana dashboards using the v2 (Dynamic Dashboards) schema. Official documentation https://grafana.com/docs/grafana/latest/dashboards/HTTP API https://grafana.com/docs/grafana/latest/developers/http_api/dashboard/#new-dashboard-apis

grafana_apps_dashboard_dashboard_v2 (Resource)

Manages Grafana dashboards using the v2 (Dynamic Dashboards) schema.

Example Usage

resource "grafana_apps_dashboard_dashboard_v2" "example" {
  metadata {
    uid = "example-dashboard-v2"
  }

  spec {
    title = "Example Dashboard V2"
    json = jsonencode({
      title       = "Example Dashboard V2"
      cursorSync  = "Off"
      elements    = {}
      layout      = { kind = "GridLayout", spec = { items = [] } }
      links       = []
      preload     = false
      annotations = []
      variables   = []
      timeSettings = {
        timezone = "browser"
        from     = "now-6h"
        to       = "now"
      }
    })
  }
}

Schema

Optional

Read-Only

  • id (String) The ID of the resource derived from UUID.

Nested Schema for metadata

Required:

  • uid (String) The unique identifier of the resource.

Optional:

  • folder_uid (String) The UID of the folder to save the resource in.

Read-Only:

  • annotations (Map of String) Annotations of the resource.
  • url (String) The full URL of the resource.
  • uuid (String) The globally unique identifier of a resource, used by the API for tracking.
  • version (String) The version of the resource.

Nested Schema for options

Optional:

  • allow_ui_updates (Boolean) Set to true to allow editing the resource from the Grafana UI. By default, resources managed by Terraform cannot be edited in the UI. Enabling this option will cause divergence between the Terraform configuration and the resource in Grafana.
  • overwrite (Boolean) Set to true if you want to overwrite existing resource with newer version, same resource title in folder or same resource uid.

Nested Schema for spec

Required:

  • json (String) The JSON representation of the dashboard v2 spec.

Optional:

  • tags (List of String) The tags of the dashboard. If not set, the tags will be derived from the JSON spec.
  • title (String) The title of the dashboard. If not set, the title will be derived from the JSON spec.