- Download the Samples folder, and unzip it.
- Open the unzipped Samples folder in VSCode, and select one of the
.bicepparamfiles you wish to deploy. - Launch the Deploy Pane to run the deployment.
Note
Extension binary packages are not signed on a Mac. If you see the following error, you will need to manually sign the extension package:
Failed to launch provider: Failed to connect to provider /Users/ant/.bicep/br/bicepextdemo.azurecr.io/extensions$local/0.1.1$/extension.bin
To work around it, run the following in a terminal window, using the path from the error message:
codesign -s - '/Users/ant/.bicep/br/bicepextdemo.azurecr.io/extensions$local/0.1.1$/extension.bin'
These commands publish the extension to the local file system, and updates the sample bicepconfig to point to the local extension.
./scripts/publish.sh ./bin/bicep-ext-local
jq '.extensions.local="../bin/bicep-ext-local"' ./samples/bicepconfig.json > ./samples/bicepconfig.new.json
mv ./samples/bicepconfig.new.json ./samples/bicepconfig.jsonRun the deployment.
~/.azure/bin/bicep local-deploy ./samples/basic/main.bicepparamTo enable verbose tracing, run the following beforehand.
export BICEP_TRACING_ENABLED=trueWhen using PowerShell, use the snippet below to enable verbose tracing:
$env:BICEP_TRACING_ENABLED = "true"This repo is set up with GitHub Actions to publish a new version to an ACR on every push to the main branch.
To pick up a new version after publishing, view the Publish Extension output, and update your bicepconfig.json to use the new spec:
To configure the GitHub Actions automation for the first time:
Log in to Azure CLI. Customize and run ./scripts/initial_setup.sh.
This repo is also intended to demonstrate how to build + publish an end-to-end Bicep extension in C#. Feel free to copy, rename and modify it to prototype building an extension to extend other services.
