Create Azure Resource Group using Bicep

0 votes

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.

Mar 23 in Azure by Edureka
• 10,880 points
368 views

1 answer to this question.

0 votes
Add a module to construct the resource group and deliver resources to it. The resources to deploy to the resource group are included in the module. Set the module's scope to the symbolic name of the resource group you've just created. You have the option of deploying to up to 800 resource groups.
answered Mar 25 by Edureka
• 12,390 points

Related Questions In Azure

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Azure Advisor Recommendations using PowerShell

The command appears to be correct. I ...READ MORE

answered Mar 4 in Azure by Edureka
• 12,390 points
290 views
0 votes
1 answer

How do I use Powershell to create an Azure Web App that runs on Linux?

Try the command below: New-AzureRmResource -ResourceGroupName <ResourceGroupName> -Location ...READ MORE

answered Mar 25 in Azure by Edureka
• 10,880 points
202 views
0 votes
1 answer
0 votes
1 answer

Azure ARM Template : Create Resource Group

To construct a resource group in an ...READ MORE

answered Mar 4 in Azure by Edureka
• 12,390 points
350 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP