store the aiostreams secret key in resource to keep it persistent [ci skip]
This commit is contained in:
parent
e4473efaea
commit
2a2a4e851a
2 changed files with 4 additions and 5 deletions
|
|
@ -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.
Loading…
Add table
Add a link
Reference in a new issue