From b9b39a45fa5e1f93bc3398c915e2d644640e28cf Mon Sep 17 00:00:00 2001 From: Ricard Illa Date: Thu, 18 Aug 2022 18:15:34 +0200 Subject: [PATCH] updated readme with details about backend --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index be47577..18bb9d3 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,20 @@ # terraform +The terraform code for my small personal infrastructure + +## Backend + +I use the pg backend on a PostgreSQL hosted on my NAS. Create the user (named +`terraform`) and database (`terraform_backend`) for it. The user's password is +managed with `pass`. + +```sh +pass generate pg.monotremata.xyz/terraform +psql -u pg.monotremata.xyz +``` + +```sql +CREATE DATABASE terraform_backend; +CREATE USER terraform WITH ENCRYPTED PASSWORD '****'; +GRANT ALL PRIVILEGES ON DATABASE terraform_backend TO terraform; +```