aboutsummaryrefslogtreecommitdiff
path: root/terraform/hash-grafana/main.tf
diff options
context:
space:
mode:
Diffstat (limited to 'terraform/hash-grafana/main.tf')
-rw-r--r--terraform/hash-grafana/main.tf49
1 files changed, 49 insertions, 0 deletions
diff --git a/terraform/hash-grafana/main.tf b/terraform/hash-grafana/main.tf
new file mode 100644
index 0000000..043b778
--- /dev/null
+++ b/terraform/hash-grafana/main.tf
@@ -0,0 +1,49 @@
+terraform {
+ required_providers {
+ docker = {
+ source = "kreuzwerker/docker"
+ version = "3.0.2"
+ }
+ postgresql = {
+ source = "cyrilgdn/postgresql"
+ version = "1.21.0"
+ }
+ random = {
+ source = "hashicorp/random"
+ version = "3.5.1"
+ }
+ sops = {
+ source = "lokkersp/sops"
+ version = "0.6.10"
+ }
+ }
+}
+
+locals {
+ host = "hash.trygvis.io"
+}
+
+provider "docker" {
+ host = "ssh://${local.host}"
+}
+
+data "sops_file_entry" "knot_pdb_terraform_password" {
+ source_file = "../../sops.yml"
+ data_key = "knot_pdb_terraform_password"
+}
+
+provider "postgresql" {
+ host = "knot.vpn.trygvis.io"
+ database = "postgres"
+ username = "terraform"
+ password = data.sops_file_entry.knot_pdb_terraform_password.data
+ sslmode = "require"
+}
+
+data "docker_network" "traefik" {
+ name = "traefik"
+}
+
+data "docker_network" "dn42" {
+ name = "dn42"
+}