Azure / Azure/azure-cli

The argument named --query-string for the az deployment group create command requires literal double quotes

Open
#17,214 1 comment 0 reactions 1 assignee Claimed by @zhoxing-ms View on GitHub
act-identity-squad ARM feature-request
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

**Describe the bug**

The az deployment group create command seems to expect literal double-quotes for the preview --query-string argument.

**To Reproduce**

If the command is executed without the double quotes, it will not be able to parse the 2nd query string parameter onwards.

Error if literal double quotes are omitted

```
az deployment group create -g resource-group-name --template-uri https://storageaccount.blob.core.windows.net/somecontainer/azuredeploy.json --query-string "sv=2019-12-12&st=2021-03-05T05%3A09%3A00Z&se=2021-03-06T05%3A09%3A00Z&sr=c&sp=racwdxlt&sig=******" --parameters C:\Temp\parameters.json
Argument '--query-string' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Unable to retrieve url https://storageaccount.blob.core.windows.net/somecontainer/azuredeploy.json?sv=2019-12-12
'st' is not recognized as an internal or external command,
operable program or batch file.
'se' is not recognized as an internal or external command,
operable program or batch file.
'sr' is not recognized as an internal or external command,
operable program or batch file.
'sp' is not recognized as an internal or external command,
operable program or batch file.
'sig' is not recognized as an internal or external command,
operable program or batch file.
```

**Expected behavior**

I would expect the --query-string parameter to not need literal double quotes, at least in Windows.

**Environment summary**

```
Windows-10-10.0.19041-SP0
Python 3.6.8
Installer: MSI

azure-cli 2.20.0
```

**Additional context**

To successfully run the command above, I have to include literal double-quotes as part of the value as such:

```
az deployment group create -g resource-group-name --template-uri https://storageaccount.blob.core.windows.net/somecontainer/azuredeploy.json --query-string "`"sv=2019-12-12&st=2021-03-05T05%3A09%3A00Z&se=2021-03-06T05%3A09%3A00Z&sr=c&sp=racwdxlt&sig=******`"" --parameters C:\Temp\parameters.json
```

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.