mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-25 04:55:30 +03:00
db9ec58f5d
Also updated the way secrets are generated with Terraform and some code cleanup
29 lines
593 B
HCL
29 lines
593 B
HCL
locals {
|
|
tokens = [
|
|
"accessToken",
|
|
"loginToken",
|
|
"refreshToken",
|
|
"fileToken"
|
|
]
|
|
}
|
|
|
|
resource "random_bytes" "this" {
|
|
for_each = toset(local.tokens)
|
|
|
|
length = 32
|
|
}
|
|
|
|
resource "kubernetes_secret" "twentycrm_tokens" {
|
|
metadata {
|
|
name = "tokens"
|
|
namespace = kubernetes_namespace.twentycrm.metadata.0.name
|
|
}
|
|
|
|
data = {
|
|
accessToken = random_bytes.this["accessToken"].base64
|
|
loginToken = random_bytes.this["loginToken"].base64
|
|
refreshToken = random_bytes.this["refreshToken"].base64
|
|
fileToken = random_bytes.this["fileToken"].base64
|
|
}
|
|
}
|