Skip to content

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

@trevonmckay

Description

@trevonmckay

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Auto-AssignAuto assign by botBatchaz batchService AttentionThis issue is responsible by Azure service team.act-observability-squadbugThis 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.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions