Repository navigation
az containerapp CLI misinterprets container arguments with leading dashes (--args "--config=..." fails) #9124
Copy link
Copy link
Closed
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
Activity
- addedbugThis 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.
on Sep 3, 2025 Thank you for opening this issue, we will look into it.
- addedquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.Auto-AssignAuto assign by botAuto assign by botService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.
on Sep 3, 2025 microsoft-github-policy-service commented
on Sep 3, 2025 ContributorMore actionsThanks for the feedback! We are routing this to the appropriate team for follow-up. cc Hong Wang (@howang-ms), Greedygre (@Greedygre).
- removedquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
on Sep 3, 2025 Hi jewelmas
Can you try with workaround, use
=:--args='--config=/etc/otel/config.yaml'
and check if it work for your case?az containerapp create -n {} -g {} --args='--config=/etc/otel/config.yaml' --environment {} --image {}This is a known issue that it will recognize value like
--somevalueas a command argument and throw error:cli.azure.cli.core.azclierror: unrecognized arguments: --config=/etc/otel/config.yamlThanks
Reacted by venkatadorisala-lnrsHi @jewelmas
Can you try with workaround, use
=:--args='--config=/etc/otel/config.yaml'and check if it work for your case?az containerapp create -n {} -g {} --args='--config=/etc/otel/config.yaml' --environment {} --image {}This is a known issue that it will recognize value like
--somevalueas a command argument and throw error:cli.azure.cli.core.azclierror: unrecognized arguments: --config=/etc/otel/config.yamlThanks
I tested and it work fine to me:

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.
Describe the bug
When attempting to pass runtime arguments to a container using the az containerapp CLI, arguments that begin with double dashes (e.g., --config=...) are incorrectly parsed as CLI flags rather than container arguments.
Related command
az containerapp update
--name my-containerapp
--resource-group my-resourcegroup
--args "--config=/etc/otel/config.yaml"
Errors
Issue script & Debug output
Expected behavior
The container should receive --config=/etc/otel-contrib/config.yaml as a runtime argument.
Environment Summary
Additional context
Please note when run via terraform the above works, only via cli it fails
No response