store the aiostreams secret key in resource to keep it persistent [ci skip]

This commit is contained in:
Viktor Barzin 2026-01-03 23:13:55 +00:00
parent e4473efaea
commit 2a2a4e851a
No known key found for this signature in database
GPG key ID: 4056458DBDBF8863
2 changed files with 4 additions and 5 deletions

View file

@ -10,10 +10,9 @@ resource "kubernetes_namespace" "aiostreams" {
} }
} }
# resource "random_string" "random" { resource "random_id" "secret_key" {
# length = 50 byte_length = 32 # 32 bytes × 2 hex chars = 64 hex characters
# lower = true }
# }
resource "kubernetes_deployment" "aiostreams" { resource "kubernetes_deployment" "aiostreams" {
metadata { metadata {
@ -49,7 +48,7 @@ resource "kubernetes_deployment" "aiostreams" {
} }
env { env {
name = "SECRET_KEY" name = "SECRET_KEY"
value = substr(sha256(uuid()), 0, 64) value = random_id.secret_key.hex
} }
env { env {
name = "DATABASE_URI" name = "DATABASE_URI"

Binary file not shown.