Azure / Azure/autorest.powershell

Use the same location of ResourceGroup when create new resource when location is not provided

Open
#783 0 comments 0 reactions 0 assignees View on GitHub
ARM feature-request P2
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.