Skip to content

Latest commit

 

History

History
105 lines (78 loc) · 3.96 KB

installing.md

File metadata and controls

105 lines (78 loc) · 3.96 KB

Setup your bicep development environment

To get the best bicep authoring experience, you will need two components:

  • Bicep CLI (required) - Compiles bicep files into ARM templates. Cross-platform.
  • Bicep VS Code Extension - Authoring support, intellisense, validation. Optional, but recommended.

Install the Bicep CLI

Linux

# Fetch the latest Bicep CLI binary
curl -Lo bicep https://github.com/Azure/bicep/releases/latest/download/bicep-linux-x64
# Mark it as executable
chmod +x ./bicep
# Add bicep to your PATH (requires admin)
sudo mv ./bicep /usr/local/bin/bicep
# Verify you can now access the 'bicep' command
bicep --help
# Done!
  

macOS

Installing via homebrew

# Add the tap for bicep
brew tap azure/bicep https://github.com/azure/bicep

# Install the tool
brew install azure/bicep/bicep

Manual install

# Fetch the latest Bicep CLI binary
curl -Lo bicep https://github.com/Azure/bicep/releases/latest/download/bicep-osx-x64
# Mark it as executable
chmod +x ./bicep
# Add Gatekeeper exception (requires admin)
sudo spctl --add ./bicep
# Add bicep to your PATH (requires admin)
sudo mv ./bicep /usr/local/bin/bicep
# Verify you can now access the 'bicep' command
bicep --help
# Done!
  

Windows

Installer

  • Download the latest Windows installer.
  • Run the downloaded executable. The installer does not require administrative privileges.
  • Step through the installation wizard.
  • After the installation, Bicep CLI will be added to your user PATH. If you have any command shell windows open (cmd, PowerShell, or similar), you will need to close and reopen them for the PATH change to take effect.

PowerShell

# Create the install folder
$installPath = "$env:USERPROFILE\.bicep"
$installDir = New-Item -ItemType Directory -Path $installPath -Force
$installDir.Attributes += 'Hidden'
# Fetch the latest Bicep CLI binary
(New-Object Net.WebClient).DownloadFile("https://github.com/Azure/bicep/releases/latest/download/bicep-win-x64.exe", "$installPath\bicep.exe")
# Add bicep to your PATH
$currentPath = (Get-Item -path "HKCU:\Environment" ).GetValue('Path', '', 'DoNotExpandEnvironmentNames')
if (-not $currentPath.Contains("%USERPROFILE%\.bicep")) { setx PATH ($currentPath + ";%USERPROFILE%\.bicep") }
if (-not $env:path.Contains($installPath)) { $env:path += ";$installPath" }
# Verify you can now access the 'bicep' command.
bicep --help
# Done!
  

Install the Bicep VS Code extension

Installing inside VS code

  • Open VS Code
  • In the Extensions tab, search for "Bicep".
  • Click "Install"

Note: The Bicep VS code extension versions older than 0.2 must be uninstalled before or after the installation of the new version. Otherwise, both extension versions will run side by side and you will see duplicated and/or inconsistent errors. Versions 0.2 or newer do not require uninstallation and will upgrade correctly.

Installing via the Visual Studio Marketplace

Verify the Bicep VS Code extension is running

Open a file called main.bicep VS code. If the extension is installed, you should see syntax highlighting working, and you should see the language mode in the lower right hand corner of the VS code window change to bicep.

Next steps

Now that you have the tooling installed, you can start the tutorial which will teach you full bicep capabilities:

1 - Working with a basic bicep file

Install the "nightly" builds of bicep

If you'd like to try the latest pre-release bits of bicep before they are released, you can follow instructions for installing the nightly builds. Note, these builds are much more likely to have known or unknown bugs.