
Learn bicep from scratch and build infrastructure as code with proof of concept assignments, deploying a storage account and a web app in Azure.
Discover infrastructure as code with Bicep and ARM, including parameters, variables, arrays, and objects. Learn to create storage accounts, web apps, and app services from scratch while understanding Azure basics.
Here we introduce the things we will learn
What is infrastructure as code
Why would you use code ?
Learn how to set up an Outlook.com account to access an Azure free trial, with signup options (Outlook or GitHub), a credit card requirement, and cancellation within 30 days.
Learn how to set up a free Azure account, verify via text, and access the portal, including 12 months of popular services and a $170 credit.
Demonstrate creating a storage account in the Azure portal within a demo resource group, showing East US and West US 3 regions, and introducing containers and blob storage.
What ARM stands for
What can it do for you ?
Watch a hands-on demo of ARM templates, inspecting an exported storage account template, its json structure, and the role of parameter files for Azure deployment.
The problem with ARM
Bicep templates explained
Explore installing PowerShell 7.x, including choosing the MSI package, verifying installation, and launching with administrator rights, while noting its use for scripting and deploying Bicep resources to the cloud.
Demonstrate downloading, installing, and launching Visual Studio Code on Windows 11, creating a desktop icon, and pinning to the taskbar for Python, PowerShell, C sharp, and bicep coding.
Install and enable the Microsoft Bicep extension in Visual Studio Code to write Bicep code, select the Bicep language, and save files as Bicep.
Learn to create a bicep template to deploy a storage account using the resource keyword, specifying name, location, sku, and kind (storage v2) in a hands-on demo.
Install the Azure PowerShell module, learn the commandlets to connect to Azure from PowerShell, and push your Bicep file (via its ARM template) to Azure for testing.
Learn to deploy a Bicep template to Azure with PowerShell 7.x by authenticating to Azure, creating a resource group, and deploying incrementally, while noting Bicep installation and path issues.
Install the bicep CLI manually for Azure PowerShell, authenticate, and deploy a bicep template to create West Europe storage account with locally redundant storage (storage v2), demonstrating infrastructure as code.
Here we introduce the things we will learn
What are parameters in Bicep
Examples
Define and use parameters in a bicep file to parameterize storage account name, location, and sku with string data types. Learn how defaults, case sensitivity, and external values drive deployment.
Discover how to determine when a resource property in Bicep requires a string by checking hover hints and official documentation, using name, location, and skew as examples.
Explore how decorators add descriptions and length constraints to Bicep parameters, and see how deployment prompts reveal min and max length validation.
What are data types and why are they important
A few data types are also mentioned
It is possible to assign default values to our parameters
Explore setting defaults in bicep to simplify deployments, override parameters, and use the dot operator to pull the resource group location for aligning storage accounts.
Learn to add defaults in the lab by specifying a default for the storage account name and a default for the storage account skew.
Add defaults for storage account name and sku, default to standard, and enforce 24-character name length and uniqueness. Use PowerShell to verify connection and deploy resource group with those defaults.
What is a function
What does the uniqueString() function do
Details on how it works
Practice using uniqueString() with resource group id in a Bicep lab, generating a 13-character resource group name, deploying and deleting a storage account to verify name consistency.
Apply Bicep's uniqueString() to generate a unique storage account name from the resource group id and validate deployment outputs using the resource id as a parameter.
What is String Interpolation and why
See how string interpolation in bicep adds a prefix to a name, evaluates the expression, and verifies the deployment output.
Explore string interpolation in a hands-on lab by combining a prefix with the unique string function output and adding a postfix dev in a progressively larger challenge.
See how to build a 24-character string with string interpolation in PowerShell by embedding a unique string with dev using the dollar curly brace syntax, and validate the deployment output.
Learn to use the Bicep resource group function and the dot operator to access its id property and insert it into a unique string, replacing the placeholder values.
Explore a lab solution that demonstrates using a resource group function to generate a unique storage account ID, perform deployment, verify results, and explain subscription-based ID differences.
What are variables
When to use variables
Learn to build a bicep demo using a variable to set a storage account name prefix, combine with a unique string and resource group ID, and test deploy in PowerShell.
Join the lab introduction to practice debugging by identifying and fixing a deliberate code mistake, turning an error into a learning challenge in this beginner to bicep course.
Explain storage account name and prefix constraints, validate prefix length in a Bicep deployment, and demonstrate deploying and testing with PowerShell to verify character limits and resulting Azure portal updates.
What is an if/else statement and how can we use this in Bicep
Learn to use if-else in a bicep template by defining an environment parameter and conditionally setting the storage account sku for prod or dev, with outputs.
We will discuss what an array is
The list of allowed values can be handy, with specifying which parameters we need
This demo uses the allowed array for the environmentType parameter to restrict values to prod or dev with a values array and placeholder.
What outputs are and why we use them
A bit more about objects
Learn how to use outputs in a Bicep template to access a storage account object's properties with the dot operator and export the storage account name.
Explore how a sku is represented as an object with properties like name, and how nested objects such as extended location with name and type edge zone are used.
Learn to pass a parameter as an object in Bicep by creating a parameter object with named properties and matching keys to avoid errors.
In this demo, learn to use an object as a parameter in bicep without changing anything, access properties with dot notation, avoid passing strings, and explore variables for object values.
What are parameter files.
Why do we use them ?
What format is it in ?
Learn to create a parameter file for a Bicep project, generate a JSON parameters file from the main Bicep, and reference it during deployment to set environment, location, and prefixes.
What is a loop
Why we can use one
Remembering the array data type
demonstrates creating a Bicep parameter of type array, looping through multiple storage account names, and handling array input, overrides, and file parameters.
No file here, since there will be a lot of small labs
Demonstrates creating a parameter of data type array and looping in bicep to generate multiple storage accounts, improving maintainability over copy-paste by mapping array elements to named stores.
Create and loop over an array parameter using a for loop with range to generate multiple storage accounts, starting the index at zero and concatenating strings.
Explore a practical demo lab on creating a parameter of data type array and looping in Bicep, using range, indexing, and the length function to iterate storage accounts.
We will look at arrays and objects
Also how these work together
Explore how to work with arrays and objects in bicep by outputting storage account names, accessing properties, and handling string outputs and array concatenation in a practical demo.
Learn to output an array of storage account names in a beginner-friendly Bicep lab, using a straightforward loop and simple syntax.
Learn how to output an array in a lab solution by storing names as strings, using zero-based indexing, and reviewing why a simple approach may be good but not ideal.
Learn how to build and output an array in Bicep by looping through storage accounts and storing names into a new array, then indexing and printing the results.
Set up a lab in Bicep that asks for a loop count via a parameter, creates that many storage accounts, and outputs their names.
Parameterize counts in bicep with an integer parameter, min two and max eight, to control storage account creation and drive loops without hardcoding.
Getting back to where we were !
Complete the end of module challenge by building storage account names in bicep with a prefix and loop, and output an array of storage objects while parameterizing the environment type.
Explore the end of module challenge solution in Bicep by building storage accounts with a for loop, arrays, and parameters, then generate and test a deployment-ready parameter file.
Here we introduce the things we will learn
Explaining what a Web App is.
Also explaining we will deploy a Web App
Create a web app in the portal by selecting a resource group and an app service with a runtime stack, then verify it runs with default code.
Learn to create a basic bicep file defining two resources: an app service plan and a web app. Reference the plan’s id to the web app and parameterize settings.
Finish the bicep lab by adding parameters for location, app service plan name, unique string resource group id, and set sku S1 for the web app and app service plan.
Finish the bicep file by turning inputs into parameters, set app service plan and web app names with string interpolation and unique string, and deploy using resource group location.
Demonstrates extending the basic bicep file to output the web application's default hostname as a string, exploring properties and properties of properties, and deploying with PowerShell.
Explanation what modules are
Why would we use modules ?
Discover how the bicep visualizer shows which resources belong in a module, using web apps, a server farm app service plan, and a storage account as examples.
learn to create a bicep module by organizing a modules folder, copying app.bicep, and parameterizing inputs with no defaults, while the main bicep file acts as the module director.
Demonstrates how to wire a module into the main bicep file, define and pass parameters, and deploy an app service with resource group location and app service plan.
Explore how to pass outputs between bicep modules, reference module outputs in the main bicep file, and view deployment details like the default hostname and web app name.
tackle the end of module challenge by configuring a bicep file to create an app service plan with 1–3 web apps, controlled by prod or dev parameters and outputs.
Guide through the end of module challenge in Bicep, configuring prod or dev environments, looping to create multiple web apps, and producing an output array.
Continue your journey in bicep by mastering basic fundamentals, tackling challenges, and embracing ongoing learning as you explore further courses like PowerShell, DevOps, and Windows administration.
Learn the how and why of Infrastructure as code with Bicep, the very easy language by Microsoft to deploy to Azure!
Bicep is a language which is up and coming and learning this language will help you stay ahead in the world of Infrastructure as code and will be of great benefit to anyone wanting to learn how to leverage the power of Infrastructure as code
This course will teach you how to create Bicep files from scratch and work your way up. You will learn important concepts like parameters, variables, data types, objects, using if, arrays, for loops, modules in Bicep and much more and how to apply them in Bicep templates.
You will learn things like :
What is Infrastructure as code ?
What are ARM Templates ?
What JSON Files are (Pronounced Jason but not Jason...) ?
What is Bicep ?
What are Parameters ?
What are data types ?
What are Built-in functions ?
What are Variables ?
How we make decisions with if ?
What are Objects ?
What are Arrays ?
What are Modules ?
We will do a lot of Hands-on in this course. There will be many little exercises and labs. We will also do some end of Module challenges, which will reinforce the concepts.
After this course you will be able to write Bicep templates and deploy them to Azure.