The Grafana provider configures data sources and dashboards in Grafana, which is a web application for creating, viewing and sharing metrics dashboards.
The provider configuration block accepts the following arguments:
url
- (Required) The root URL of a Grafana server. May alternatively be set via the GRAFANA_URL
environment variable.
auth
- (Required) The API token or username/password to use to authenticate to the Grafana server. If username/password is used, they are provided in a single string and separated by a colon. May alternatively be set via the GRAFANA_AUTH
environment variable.
Use the navigation to the left to read about the available resources.
provider "grafana" { url = "http://grafana.example.com/" auth = "1234abcd" } resource "grafana_dashboard" "metrics" { config_json = "${file("grafana-dashboard.json")}" } resource "grafana_data_source" "influxdb" { type = "influxdb" name = "test_influxdb" url = "http://influxdb.example.net:8086/" username = "foo" password = "bar" database_name = "mydb" } resource "grafana_alert_notification" "slack" { name = "My Slack" type = "slack" settings { "slack" = "https://myteam.slack.com/hoook" "recipient" = "@someguy" "uploadImage" = "false" } }
© 2018 HashiCorpLicensed under the MPL 2.0 License.
https://www.terraform.io/docs/providers/grafana/index.html