This repo sets up the following resources:
- Alerts: folder, rules, contacts, notification template
- Dashboard: folder, dashboards
- Terraform CLI
- A Grafana stack
- Grafana Service account token
- Clone this repo and cd into the directory
- You need to set up the Grafana provider for your account by setting two config settings that are imported via tf variables.
touch terraform.tfvars
- in this file add:
service_account_token = "{your service account token}"
grafana_url = "{your url}" #Format is "https://mycompany.grafana.net/"
terraform init
will set up Terraform to be ready to create a plan, which includes getting the NR Terraform provider as stated in the main.tf fileterraform plan
- check out what will be created, if it looks good proceed to...terraform apply
- you should now have a few things in your account: dashboards, synthetics, and alerts conditions and policies.