Home > Software design >  Deploying resources using bicep [Microsoft]
Deploying resources using bicep [Microsoft]

Time:09-24

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 .

CodePudding user response:

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"
  • Related