Skip to content

Commit 363a9a6

Browse files
committed
wip
1 parent ad35f7f commit 363a9a6

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

infrastructure/modules/container-app/main.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,14 @@ resource "azurerm_container_app" "main" {
7676
}
7777
}
7878

79+
dynamic "secret" {
80+
for_each = var.secret_variables
81+
content {
82+
name = lower(secret.key)
83+
value = secret.value
84+
}
85+
}
86+
7987
dynamic "env" {
8088
for_each = var.fetch_secrets_from_app_key_vault ? data.azurerm_key_vault_secrets.app[0].secrets : []
8189
content {

infrastructure/modules/container-app/variables.tf

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,13 @@ variable "docker_image" {
5252
}
5353

5454
variable "environment_variables" {
55-
description = "Environment variables to pass to the container app. Only non-secret variables. Secrets must be stored in key vault 'app_key_vault_id'"
55+
description = "Environment variables to pass to the container app. Only non-secret variables. Secrets can be stored in key vault 'app_key_vault_id'"
56+
type = map(string)
57+
default = {}
58+
}
59+
60+
variable "secret_variables" {
61+
description = "Secret environment variables to pass to the container app."
5662
type = map(string)
5763
default = {}
5864
}

0 commit comments

Comments
 (0)