Azure / Azure/autorest.powershell
Use the same location of ResourceGroup when create new resource when location is not provided
- Dominant language
- C#
- Stars
- 123
- Forks
- 99
- PR merge metrics
- No merged PRs in 30d
Description
In most situation, user want to use the same location with ResourceGroup when they create a new resource. But we don’t have the logic for this and leave it to the users currently.
Existing code
```
New-AzResourcegroup -Name wyunchi-costmanagement -Location eastus
New-AzStorageAccount -ResourceGroupName wyunchi-costmanagement -Name wyunchistorageaccount -SkuName Standard_LRS -Location eastus
```
New code (`-Location eastus` in `New-AzStorageAccount` is not required. The value is inherited from resource group)
```
New-AzResourcegroup -Name wyunchi-costmanagement -Location eastus
New-AzStorageAccount -ResourceGroupName wyunchi-costmanagement -Name wyunchistorageaccount -SkuName Standard_LRS
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.