resource "random_uuid" "grafana_password" {
}

resource "postgresql_role" "grafana" {
  name     = "grafana"
  login    = true
  password = random_uuid.grafana_password.result
}

resource "postgresql_database" "grafana" {
  name  = "grafana"
  owner = "grafana"
}