Approach 1: Wrap the value of "env-vars" in double quotes
This results in 1 environment variable on the container app, with all vars in 1 value.
Approach 2: Wrap just the value of APPLICATION_INSIGHTS_CONNECTION_STRING in double quotes:
This results in an invalid CLI command (some of the parameters are missing)
Issue script & Debug output
az containerapp up \
--resource-group rg-bothub-toolapi-dev1 \
--location eastus2 \
--name toolapidev1 \
--ingress external \
--target-port 3100 \
--env-vars AZURE_OPENAI_ENDPOINT=aaaa AZURE_OPENAI_KEY=aaaa ARM_SUBSCRIPTION_ID=0000000-0000-0000-0000-00000000000 LOCATION=eastus2 APPLICATIONINSIGHTS_CONNECTION_STRING=InstrumentationKey=0000000-0000-0000-0000-0000000000;IngestionEndpoint=https://eastus2-3.in.applicationinsights.azure.com/;LiveEndpoint=https://eastus2.livediagnostics.monitor.azure.com/;ApplicationId=00000000 \
--logs-workspace-id SomeId \
--logs-workspace-key SomeKey \
--workload-profile-name "Consumption" \
--source . \
--debug
You must specify either --source, --repo, or --image
/bin/sh: 8: --logs-workspace-id: not found
Expected behavior
The parameter --env-vars should handle environment variable values with "=" in them.
From Docs on Application Insights:
Application Insights is changing from global ingestion endpoints to regional endpoints that use connection strings, which provide [additional capabilities](https://learn.microsoft.com/en-us/azure/azure-monitor/app/connection-strings#connection-string-capabilities).
Describe the bug
az containerapp up --env-vars does not work with APPLICATION_INSIGHTS_CONNECTION_STRING (or any other var that contains "=" regardless of escaping)
Command in question:
az containerapp up
Parameter:--env-vars
Example command:
Approach 1: Wrap the value of "env-vars" in double quotes
Approach 2: Wrap just the value of APPLICATION_INSIGHTS_CONNECTION_STRING in double quotes:
Related command
Errors
Approach 1: Wrap the value of "env-vars" in double quotes
Approach 2: Wrap just the value of APPLICATION_INSIGHTS_CONNECTION_STRING in double quotes:
Issue script & Debug output
Expected behavior
The parameter
--env-vars
should handle environment variable values with "=" in them.From Docs on Application Insights:
Azure Monitor Source : Migrate from Application Insights instrumentation keys to connection strings
Environment Summary
azure-cli 2.65.0
core 2.65.0 telemetry 1.1.0
Dependencies: msal 1.31.0 azure-mgmt-resource 23.1.1
Python location '/opt/az/bin/python3' Extensions directory '/home/vscode/.azure/cliextensions'
Python (Linux) 3.11.8 (main, Sep 25 2024, 11:34:44) [GCC 12.2.0]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.
Additional context
No response