aboutsummaryrefslogtreecommitdiff
path: root/terraform/hash-grafana/pdb.tf
diff options
context:
space:
mode:
Diffstat (limited to 'terraform/hash-grafana/pdb.tf')
-rw-r--r--terraform/hash-grafana/pdb.tf13
1 files changed, 13 insertions, 0 deletions
diff --git a/terraform/hash-grafana/pdb.tf b/terraform/hash-grafana/pdb.tf
new file mode 100644
index 0000000..e2a59cd
--- /dev/null
+++ b/terraform/hash-grafana/pdb.tf
@@ -0,0 +1,13 @@
+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"
+}