How to Create a Bicep Template With VS Code

In this post, we will show how easy it is to define and build Bicep templates with VS Code Bicep extension.

The Bicep extension for VS Code helps us create and define resources by using an autocompletion engine that shows us what properties the resource has. To access the autocompletion, we use the spacebar key.

About Azure Bicep

The Resource Manager template language Azure Bicep enables you to deploy Azure resources declaratively. It’s a domain-specific language, which implies it was created specifically to deploy Azure resources. Bicep is only used to create Resource Manager templates.

Bicep is designed to be simple to understand and learn, regardless of your prior experience with other programming languages. Bicep templates can use all resource types, API versions, and property values.

Build Templates

Download the Bicep VS Code extension to build a template, as shown below.

Once you install the extension, create a file with .bicep extension name and start typing the resource’s name.

For storage, the account starts typing storage, and you will see the autocompletion display a resource that starts with res-storage.

To find the properties of the storage account, click on space, and you will show more options, as shown in the animated gif below.

For more Bicep posts, visit the category page below.

1 comment

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.