Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deploying resources using bicep

Trying to deploy resources on Azure for this we are using bicep from microsoft.

For the execution of the code I am using visual studio code insider.

Note This is an example which I am posting here.

Code is as follows

    resource stg 'Microsoft.Storage/storageAccounts@2019-06-01' = {
  name: 'uniquestorage001' // must be globally unique
  location: 'eastus'
  kind: 'Storage'
  sku: {
    name: 'Standard_LRS'
  }
}

at the terminal we use the following command to build it

bicep build main.bicep

I get the below error message

bicep: The term 'bicep' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again

I have installed the bicep extension.

I am really not sure what can be done further kindly help .

like image 892
sudlo Avatar asked Dec 07 '25 04:12

sudlo


1 Answers

You can follow this documentation to install bicep:
Install Bicep tools

You need to install Azure CLI then you will be able to install bicep:

az bicep install

To build you bicep file you can then use:

az bicep build --file main.bicep

Also you don't need to build your bicep file before deploying it, AZ CLI allow you to deploy directly your bicep file

az deployment group create --resource-group "my resource group name" --template-file ".\main.bicep"
like image 171
Thomas Avatar answered Dec 08 '25 23:12

Thomas