File tree Expand file tree Collapse file tree
infrastructure/modules/container-app Expand file tree Collapse file tree Original file line number Diff line number Diff 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 {
Original file line number Diff line number Diff line change @@ -52,7 +52,13 @@ variable "docker_image" {
5252}
5353
5454variable "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}
You can’t perform that action at this time.
0 commit comments