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, 2022 in Azure by Edureka
• 11,450 points
489 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, 2022 by Edureka
• 12,890 points

Related Questions In Azure

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

How to create Azure API Gateway Resource?

Go to your API Management instance In the ...READ MORE

answered Apr 12, 2022 in Azure by Edureka
• 11,450 points
166 views
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, 2022 in Azure by Edureka
• 12,890 points
358 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, 2022 in Azure by Edureka
• 11,450 points
255 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, 2022 in Azure by Edureka
• 12,890 points
434 views
0 votes
1 answer

Can I create virtual machine without virtual network in Azure Resource Manager?

A VNet is used to provide the ...READ MORE

answered Mar 4, 2022 in Azure by Edureka
• 12,890 points
582 views
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