Azure / azure-cli

Azure Command-Line Interface
MIT License
3.97k stars 2.95k forks source link

Unable to set environment setting for Batch task when there are equal signs in the value such as a Sql Connection string #24887

Open trevonmckay opened 1 year ago

trevonmckay commented 1 year ago

Related command az batch task create

Is your feature request related to a problem? Please describe. Unable to set environment setting that contains an equal sign. F

Describe the solution you'd like We should be able to escape the equal sign in the value of an environment setting either with a slash ('\') or by wrapping the entire value in quotes

az batch task create --environment-setting ConnectionString="Server=tcp:servername,1433"

or

az batch task create --environment-setting ConnectionString=Server\=tcp:servername,1433

Describe alternatives you've considered

Additional context If I attempt to set a connection string like such SqlConnection="Server=tcp:servername.database.windows.net,1433;Initial Catalog=sqldb-app-dev_simplesearch;Persist Security Info=False;MultipleActiveResultSets=False;Encrypt" this fails with error invalid environment_setting_format

yonzhan commented 1 year ago

route to CXP team

ghost commented 1 year ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @cRui861, @paterasMSFT, @gingi, @dpwatrous, @mksuni, @bgklein, @mscurrell.

Issue Details
**Related command** az batch task create **Is your feature request related to a problem? Please describe.** Unable to set environment setting that contains an equal sign. F **Describe the solution you'd like** We should be able to escape the equal sign in the value of an environment setting either with a slash ('\') or by wrapping the entire value in quotes ``` az batch task create --environment-setting ConnectionString="Server=tcp:servername,1433" ``` or ``` az batch task create --environment-setting ConnectionString=Server\=tcp:servername,1433 ``` **Describe alternatives you've considered** **Additional context** If I attempt to set a connection string like such SqlConnection="Server=tcp:servername.database.windows.net,1433;Initial Catalog=sqldb-app-dev_simplesearch;Persist Security Info=False;MultipleActiveResultSets=False;Encrypt" this fails with error invalid environment_setting_format
Author: trevonmckay
Assignees: SaurabhSharma-MSFT
Labels: `Service Attention`, `Batch`, `customer-reported`, `CXP Attention`, `Auto-Assign`
Milestone: -