-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Open
Labels
Auto-AssignAuto assign by botAuto assign by botContainerAppService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.bugThis issue requires a change to an existing behavior in the product in order to be resolved.This issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.
Description
Describe the bug
Bug Description
I am building a containerapp using az containerapp compose create. My compose file's environment section declares several variables that are to be read in from environment variables, many of which have default values. Rather than using the default value for unset environment variables, the command uses the literal string of the variable reference as the value.
Example
Say this is the compose file:
environment:
VAR_A: ${VAR_A}
VAR_B: ${VAR_B:-foo}
VAR_C: ${VAR_C:-bar}And my locally set environment variables are:
VAR_A=hello
VAR_B=world
# VAR_C intentionally left un-setAzure will read my environment variables as:
"env": [
{
"name": "VAR_A",
"value": "hello"
},
{
"name": "VAR_B",
"value": "world"
},
{
"name": "VAR_C",
"value": "${VAR_C:-bar}" // BUG: This should be "bar" since VAR_C was not set
},
]Related command
az containerapp compose create
Errors
Please see description
Issue script & Debug output
Please see description.
Expected behavior
Default values for un-declared env variables referenced in the compose file should be interpreted correctly.
Environment Summary
azure-cli 2.81.0
containerapp extension 1.3.0b1
Additional context
No response
Metadata
Metadata
Assignees
Labels
Auto-AssignAuto assign by botAuto assign by botContainerAppService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.bugThis issue requires a change to an existing behavior in the product in order to be resolved.This issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.