Azure / Azure/azure-cli

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

Open
#24,887 2 comments 0 reactions 0 assignees View on GitHub
act-observability-squad Auto-Assign Batch bug customer-reported Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

**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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.