updated readme with details about backend

main
Ricard Illa 2022-08-18 18:15:34 +02:00
parent 173fb843c7
commit b9b39a45fa
No known key found for this signature in database
GPG Key ID: F69A672B72E54902
1 changed files with 18 additions and 0 deletions

View File

@ -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;
```