loop through env variables to get the secret DOC : https://stackoverflow.com/questions/69945533/creating-a-dynamic-secret-variable-block-within-terraform-for-cloud-run
This commit is contained in:
+19
-8
@@ -31,23 +31,34 @@ kubernetes = {
|
||||
requests-cpu = "25m"
|
||||
requests-memory = "25Mi"
|
||||
}
|
||||
environment_variables = { PORT = 80 }
|
||||
pvc = {
|
||||
first = {
|
||||
name = "onitama"
|
||||
pvc_size = "1Mi"
|
||||
mount_path = "/code"
|
||||
# environment_variables = { PORT = 80, test = 22 }
|
||||
environment = {
|
||||
MY_VAR = {
|
||||
name = "MY_VAR"
|
||||
value_from = {
|
||||
secret_key_ref = {
|
||||
name = "my_secret"
|
||||
key = "latest"
|
||||
}
|
||||
}
|
||||
}
|
||||
second = {
|
||||
}
|
||||
pvc = {
|
||||
onitamadeux = {
|
||||
name = "onitamadeux"
|
||||
pvc_size = "2Mi"
|
||||
mount_path = "/deuxcode"
|
||||
}
|
||||
onitama = {
|
||||
name = "onitama"
|
||||
pvc_size = "1Mi"
|
||||
mount_path = "/code"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
nginx = {
|
||||
enabled = true
|
||||
enabled = false
|
||||
namespace = "testnginx"
|
||||
#image = "localhost:31795/django-python"
|
||||
image = "nginx:latest"
|
||||
|
||||
Reference in New Issue
Block a user