Skip to content

Include scripts to update Azure CLI and install Bicep for running Bicep Script in Github Codespaces. #86

@ss4aman

Description

@ss4aman

Hello Team.

I have noticed that when we do this lab using Github Codespaces and when going to the step to deploy the infrastructure using the Bicep Template, the Azure CLI version is in an older version where Bicep is not supported. This causes error as the CLI does not recognize bicep files. The solution is to upgrade the Azure CLI and install Bicep in Codespaces. Here is the following lines of code that worked for me:

sudo mkdir -p /etc/apt/keyrings
curl -sS https://packages.microsoft.com/keys/microsoft.asc
| sudo gpg --dearmor -o /etc/apt/keyrings/microsoft.gpg

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg
| sudo gpg --dearmor -o /usr/share/keyrings/yarn-archive-keyring.gpg

sudo curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash

az bicep install
az bicep version

Can we include this in the prerequisites?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions