Azure / Azure/azure-cli

Allow passing of command line arguments via file

Ouverte
#17,543 1 commentaire 0 réactions 1 personne assignée Réclamée par @jiasli Voir sur GitHub
act-platform-engineering-squad Core feature-request
Langage dominant
Python
Étoiles
4.6k
Forks
3.5k
Merge moyen
3 j 22 h
PR mergées (30 j)
64

Description

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

We rely on AZ CLI to maintain our service infra. One of the things that we do is configure Web Access Firewall rules to allow access to endpoints only to certain IP address ranges. Unfortunately, the list of IP address ranges is too long and we're running into a problem with command line length (at least on Windows). I.e., when fully constructed, `az cdn waf policy custom-rule set` command line results in "The command line is too long" error message, not an actual functionality being performed.

**Describe the solution you'd like**

That'd be great if we could pass command line args via file instead of listing them all in the command line.

For example, 7-zip allows using @listfile when it comes to passing a list of files:

```
Usage: 7z [...] [...] [@listfile]
[...]

-ai[r[-|0]]{@listfile|!wildcard} : Include archives
-ax[r[-|0]]{@listfile|!wildcard} : eXclude archives
```

Given that AZ CLI has a diverse set of commands, I'd go with something like `az @argfile` to avoid figuring out which specific commands must be updated to allow passing a file instead of a list of args.

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.