I'm trying to create an Azure Resource Group using a .bicep file:
targetScope = 'subscription'
param environment string
param location string = deployment().location
resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
name: 'snapshot-generator-${environment}-west-eu'
location: location
}
And for deploy I'm using the following command in PowerShell:
New-AzResourceGroupDeployment -TemplateFile resourceGroup.bicep
but the ResourceGroupName is requested and I can't understand why and what I'm doing wrong.