github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/website/source/docs/providers/grafana/r/dashboard.html.md (about)

     1  ---
     2  layout: "grafana"
     3  page_title: "Grafana: grafana_dashboard"
     4  sidebar_current: "docs-influxdb-resource-dashboard"
     5  description: |-
     6    The grafana_dashboard resource allows a Grafana dashboard to be created.
     7  ---
     8  
     9  # grafana\_dashboard
    10  
    11  The dashboard resource allows a dashboard to created on a Grafana server.
    12  
    13  ## Example Usage
    14  
    15  ```hcl
    16  resource "grafana_dashboard" "metrics" {
    17    config_json = "${file("grafana-dashboard.json")}"
    18  }
    19  ```
    20  
    21  Dashboards can be exported from Grafana's web UI in JSON format and provided
    22  via the `config_json` argument.
    23  
    24  The exported JSON will include references to Grafana data sources, but the
    25  data source configuration is not exported in this way. In order to fully
    26  manage a dashboard with Terraform, necessary data sources can be created
    27  using the `grafana_data_source` resource. In order to ensure that a data
    28  source is created before a dashboard that refers to it, use the `depends_on`
    29  meta-parameter:
    30  
    31  ```hcl
    32      depends_on = ["grafana_data_source.metrics"]
    33  ```
    34  
    35  ## Argument Reference
    36  
    37  The following arguments are supported:
    38  
    39  * `config_json` - (Required) The JSON configuration for the dashboard.
    40  
    41  ## Attributes Reference
    42  
    43  The resource exports the following attributes:
    44  
    45  * `slug` - A URL "slug" for this dashboard, generated by Grafana by removing
    46    certain characters from the dashboard name given as part of the `config_json`
    47    argument. This can be used to generate the URL for a dashboard.