-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
Is your feature request related to a problem? Please describe.
Several resources have a network-rule component to their management. Having to memorize or -h for different resources network-rule naming conventions is challenging. It would be sensible to have the network-rule configuration parameters be consistent across resources. For example, see below
az cosmosdb network-rule add --virtual-network vnet --subnet subnet
az keyvault network-rule add --vnet-name vnet --subnet subnet
As you can see, adding a network rule for cosmosdb uses a --virtual-network param to represent a vnet name, while adding a network rule for keyvault uses a --vnet-name param to represent a vnet name.
This would be extremely helpful and simplifying for creating, managing, and deploying infrastructure -- and in particular infrastructure-as-code, enabling more advanced scripting and code re-use (e.g. you can script injections of network-rule consistently across resources since those firewall rules are often consistently across an entire workload of things like storage accounts, cosmosdb, keyvault, etc).
Describe the solution you'd like
Determine a consistent network-rule parameter naming convention. Implement them in a non-breaking way -- use an alias for those parameters that don't follow the agreed upon convention (e.g. using the example above, if you choose to go with --virtual-network, add an alias to the --vnet-name parameter of keyvault for --virtual-network).
Describe alternatives you've considered
The alternative is really just to memorize the differences, and -h when you forget.
Additional context
https://docs.microsoft.com/en-us/cli/azure/cosmosdb/network-rule?view=azure-cli-latest#az-cosmosdb-network-rule-add
https://docs.microsoft.com/en-us/cli/azure/keyvault/network-rule?view=azure-cli-latest#az-keyvault-network-rule-add