- Lab
-
Libraries: If you want this lab, consider one of these libraries.
- Cloud
Build a Reusable Azure Infrastructure Pattern with Bicep
In this lab, you’ll build a reusable Azure infrastructure pattern from an existing Bicep template. You will inspect the current deployment, identify a reusable resource boundary, define a parameterized Bicep module, connect it to the parent template, and verify the result with a what-if review and deployment evidence. When you’re finished, you will have refactored a Bicep deployment into a modular, parameterized pattern that is ready for handoff and reuse across environments.
Lab Info
Table of Contents
-
Challenge
Access Azure cloud shell
- Log in to the Azure portal and open Azure Cloud Shell in Bash.
- Confirm Azure CLI is available and install Bicep if needed.
-
Challenge
Inspect the existing Bicep deployment to identify reusable boundaries
- Identify the resource group and set the deployment context.
- Deploy the baseline monolithic Bicep template.
- Review the deployment to find reusable boundaries and environment-specific values.
-
Challenge
Define and parameterize a reusable Bicep module
-
Add a storage account module file.
-
Parameterize name, location, SKU, access tier, and tags.
-
Add outputs for the storage account name, resource ID, and primary blob endpoint, and then validate that the module compiles.
-
-
Challenge
Connect the reusable module to the parent deployment
-
Refactor the parent deployment to call the module.
-
Pass naming, location, sizing, and tag inputs.
-
Surface module outputs in the parent deployment and validate compilation.
-
-
Challenge
Preview, deploy, and verify the reusable pattern
-
Run a what-if preview to confirm the refactor is safe.
-
Reuse the module for a second environment and preview the change with what-if.
-
Deploy the updated pattern, verify outputs, and capture them to a file for handoff.
-
About the author
Real skill practice before real-world application
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Learn by doing
Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.
Follow your guide
All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.
Turn time into mastery
On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.