Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support uri scheme for parameter files by creating a new parameter --parameter-file #12970

Closed
vairakkumaar-svs-hf opened this issue Apr 11, 2020 · 2 comments
Assignees
Labels
Core CLI core infrastructure Shell - PowerShell
Milestone

Comments

@vairakkumaar-svs-hf
Copy link

Is your feature request related to a problem? Please describe.

Unable to use @ for parameter file reference in Powershell 7. It requires to create scripts for windows batch and linux separate than Powershell 7. Also, Powershell has more features in command line than windows command terminal.

Describe the solution you'd like

Instead of modifying the parameters argument to support URI format to reference parameters file, create a new argument to support URI convention to support local files.

Describe alternatives you've considered

Update parameters to support URI convention for parameters to refer local files.
like --parameters ./parameters.json that will work in all environments

Additional context

@yonzhan yonzhan added the Core CLI core infrastructure label Apr 12, 2020
@yonzhan yonzhan added this to the S170 milestone Apr 12, 2020
@yonzhan
Copy link
Collaborator

yonzhan commented Apr 12, 2020

add to S170

@jiasli
Copy link
Member

jiasli commented Apr 12, 2020

The reason why we don't design separate parameters for files is that we don't know which parameter should be read from the file. In other words, users can use a file as input for any parameter.

@ is a more general approach which supports all parameters. In PowerShell terminal, @ is reserved for splatting. To use it in az as a file name indicator, you only need to escape it:

# Escape with backtick
az `@body.json

# Surround with single quotes
az '@body.json'

# Surround with double quotes
az "@body.json"

For more info about PowerShell usage, please see About Quoting Rules and About Special Characters.

For Azure CLI usage, please see Tips for using Azure CLI effectively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core CLI core infrastructure Shell - PowerShell
Projects
None yet
Development

No branches or pull requests

3 participants