Four parameterization options for your Azure Bicep deployments

Hello Cloud Marathoners,

In my last posts, I wrote about Azure CL and a Bicep language. The Azure Bicep language, helps to author and manage Azure resources more cleanly and easily on your Azure subscription.


The parameterization of infrastructure deployment files is an important skill where true power of automation and code reuse comes forward.
Let’s learn about different parameterization options that you could use in your Azure Bicep deployments. As an example, we will examine the following parameterization options on an Azure Bicep web app deployment file.

βœ”οΈ Using Bicep file as is

βœ”οΈ Using default parameters on your bicep file

βœ”οΈ Simply adding parameters into your command line

βœ”οΈ Using a separate file for parameters, per environment

Option 1: Using Bicep file as is

This first option is the most straightforward way to declare your parameters. However, you would have to enter each parameter name, every time you are deploying the Azure resources.

Following screenshot is a default Bicep web app declaration with parameters. Check the Learn Bicep repo here πŸ‘


Now, let’s declare an Azure CLI command that will deploy our Azure Bicep file into a Resource group.

# Create a rg-test-deploy RG
az group create -l eastus -g 'rg-test-deploy'

# Option-1: Run deployment file as is
az deployment group create -g 'rg-test-deploy' -f .\param-files\webapp-service-w-param.bicep

# List all webapps in the subscription
az webapp list --query [].name -o table

Option 2: Using default parameters on your bicep files

The second option will allow us to deploy our Bicep file without entering the default values each time. However, it would require an update on file each time you want to change parameter values 😒

Now, we can take the previous webapp-service Bicep file, and add its default values. The updated Bicep file will look like the following screenshot:


Our Azure CLI deployment script would just get a new file name

# Option-2: Run deployment with default values
az deployment group create -g 'rg-test-deploy' -f .\param-files\webapp-service-default-param.bicep

# You could also add preflight check with "-c" at the end of each deployment script

Option 3: Simply adding parameters into your command line script

If you would prefer to type parameters and values on a terminal then third option can deliver it for you. That script will look like the following sample:

# Option-3: Run deployment with inline parameters
az deployment group create -g 'rg-test-deploy' -f .\param-files\webapp-service-w-param.bicep -p location='eastus' appServiceAppName='param-demoapp18' appServicePlanName='asp-param-demo'

Option 4: Using a separate file for parameters, per environment

The last option has multiple advantages over prior options. As you could create separate environment parameters in their own dedicated files and manage them accordingly.
For example: You can create a separate param file for “Dev” environment deployments; like in the following screenshot.

Note: parameter files for Bicep language are using a JSON notation, similar to the way how ARM JSON declares parameter files with a following schema.

"https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#"

And our deployment script will look like the following sample:

# Option-4: Run deployment with a separate parameter file
az deployment group create -g 'rg-test-deploy' -f .\param-files\webapp-service-w-param.bicep -p .\param-files\webapp-service-parameters-dev.json

# List all webapps in the subscription
az webapp list --query [].name -o table

# Clean all resources from RG
az group delete -n 'rg-test-deploy' --yes

Summary

Thank you πŸ™ for reading this post and learning about four different options to deploy your Azure Bicep files using Azure CLI.

Please check out the Learn Bicep GitHub repo, and follow it.
Thanks πŸ™ πŸ™Œ !

Stay tuned for more Azure automation & Azure Bicep posts.

Fᴏʟʟᴏᴑ ᴍᴇ 🎯 α΄€Ι΄α΄… become α΄€ #cloudmarathoner β›…πŸƒβ€β™‚οΈπŸƒβ€β™€οΈ – 𝐋𝐄𝐓’𝐒 π‚πŽπππ„π‚π“ πŸ‘

Quarterly website statistics on Cloud Marathoner’s Journey

Hi friends,

I was looking into an analytics tool to check the current status of a site, and was blown away by interest in my blog posts.

Your continued interest in the #cloudmarathoner perspective and interest to check and learn – adds extra motivation to my blogging, as it brings a visible value to the community.

All right, without any overdue, here is are the statistics for the last quarter:

Looks like our blog is doing pretty well on all categories. Although most users are visiting from the US and India, there are blog readers from all over the world.Β 

And of course there is not much activity, as i was on a summer break during July and beginningΒ of August πŸ™‚

Just want to say ” HUGEΒ Thank You !!! ” – for continuedΒ interest and support in #cloudmarathoner content!

Support & Subscribe to #cloudmarathoner LinkedIn tag πŸ‘πŸ‘€
Stay tuned for more Azure IoT, Automation & Security related posts.

Fᴏʟʟᴏᴑ ᴍᴇ πŸŽ― α΄€Ι΄α΄… become α΄€ #cloudmarathoner β›…πŸƒβ€β™‚οΈπŸƒβ€β™€οΈ – 𝐋𝐄𝐓’𝐒 π‚πŽπππ„π‚π“ πŸ‘

August month updates from Azure Bicep

Hi friends,

This month we have awesome updates from Azure bicep team that I am happy to share with all of you (Azure community, Deployment Automation, Resource management and Governance geeks πŸ™‚

The following list are August month updates:

  • Bicep Linter, Snippets, Scaffolding
  • Right click build
  • Deployment Stack updates
  • Bicep roadmap plans (v0.5 and eventually v1.0)
  • Bicep registry
  • OCI Artifact standardizations
  • Module registry functionality
  • Module Reference Syntax
  • Parameter Improvement options

Bicep Linter updates

The yellow squiggly lines indicate the Linter violations and complains where best practices are violated. Like, password param should not be checked into the code repository. Another one is using string concat function instead of string interpolation.

Right click build

The right click build on bicep file is a new convince feature that was also added on new build.

You can also use a shortcut keys Ctrl+Shift+B as an alternative way to build your JSON files from bicep files.

Scaffolding feature

This feature also arrived on a v0.4.6 build that provides required-properties to be auto populated to speed up your Azure resource coding. It is derived from a resources swagger spec and auto-populated for you. Yay!

New Code Snippets

You will love to discover that bunch of new snippets has been added.

Just type res- and you will scroll over all those starter boilplet code. Just imagine how much time you will be saving. It is Huge!!!

Bicep Roadmap annoncements

Well, Bicep team annonced that next build will bring the v0.5 and they do target v1.0 by th end of the year. What does it mean is – there will be no API level breaking changes starting from the version v1.0.

What is Next?

Keep tuned for upcoming v0.5 version. The Module registry updates and syntax updates on OCI Artifacts are going to be next Huge things, as they will add into the maturity of this AWESOME tool in Azure!

Check out for more @ GitHub – Azure/bicep: Bicep is a declarative language for describing and deploying Azure resources

Stay tuned for more Azure automation & Security related posts.

Fᴏʟʟᴏᴑ ᴍᴇ 🎯 α΄€Ι΄α΄… become α΄€ #cloudmarathoner β›…πŸƒβ€β™‚οΈπŸƒβ€β™€οΈ – 𝐋𝐄𝐓’𝐒 π‚πŽπππ„π‚π“ πŸ‘

How to check and update Azure CLI version on your workstation?

Hello friends,

I was prompted to update my CLI and wanted to share this easy experience with everyone.


There is an easy straightforward process to check & update your favourite Azure CLI in a few minutes without leaving the command line tool of your choice.

There are 2 commands that you would ever need going forward, assuming that your version of CLI is already “2.x”.

Check your az cli version

Just run the az version --help command first.

Check the AZ CLI version

Running update on AZ CLI

Next, run the az upgrade command and press key Y when prompted to continue.

Upgrade the AZ CLI version

And finally, check the updated version and its extensions if needed.

Verify upraded version and Bicep

In case your AZ CLI is up to date, you could always run az bicep upgrade command and get the job done.

Stay tuned for more Azure automation & Security related posts.

Fᴏʟʟᴏᴑ ᴍᴇ 🎯 α΄€Ι΄α΄… become α΄€ #cloudmarathoner β›…πŸƒβ€β™‚οΈπŸƒβ€β™€οΈ – 𝐋𝐄𝐓’𝐒 π‚πŽπππ„π‚π“ πŸ‘

Azure introduced new Fusion Detection for Ransomware!

Hi Cloud Marathoners,

This week a new service – Fusion Detection for Ransomware has been announced. These Fusion detections correlate alerts that are potentially associated with ransomware activities that are observed at defense evasion and execution stages during a specific timeframe.Β 

What is Ransomware?

Ransomware attack is a type of attack that involves using specific types of malicious software or malware to make a network or system inaccessible for the purpose of extortion – β€˜ransom’.

There is no doubt that ransomware attacks have taken a massive turn in being the top priority as a threat to many organizations. AΒ recent reportΒ released byΒ PurpleSecΒ revealed that the estimated cost of ransomware attacks was $20 billion in 2020 and with downtime increasing by over 200% and the cost being 23x higher than 2019.

Preventing such attacks in the first place would be the ideal solution but with the new trend of β€˜ransomware as a service’ and human operated ransomware, the scope and the sophistication of attacks are increasing – attackers are using slow and stealth techniques to compromise network, which makes it harder to detect them in the first place.

AI in action with Azure Sentinel for help!

Good new is that #azuresentinelΒ πŸ”₯ is constantly getting more efficient by introducingΒ #AIΒ in action – SentinelΒ #fusion!

In order to help your analyst quickly understand the possible attack, Fusion provides you with a complete picture for the suspicious activities happened on the same device/host by correlating signals from Microsoft products as well as signals in network and cloud. Supported data connectors include:

”With Fusion detection for ransomware that captures malicious activities at the defense evasion and execution stages of an attack, it gives security analysts an opportunity to quickly understand the suspicious activities happened around the same timeframe on the common entities, connect the dots and take immediate actions to disrupt the attack.”

Microsoft is commited to release new multistage attack scenarios detected by Fusion in Azure Sentinel. You could keep an eye on thereΒ Azure Sentinel FusionΒ page and get latest updates there πŸ™‚

Stay tuned for more Azure automation & Security related posts.

Fᴏʟʟᴏᴑ ᴍᴇ 🎯 α΄€Ι΄α΄… become α΄€ #cloudmarathoner β›…πŸƒβ€β™‚οΈπŸƒβ€β™€οΈ – 𝐋𝐄𝐓’𝐒 π‚πŽπππ„π‚π“ πŸ‘

#microsoftsecurity
#security
#infosec
#cybersecurity

Essential Azure cloud transformation handbook – for everyone

Hi Cloud Marathoners,

There might be some technical knowledge gaps when we start to learn a new cloud service or its features. One way to minimize it – is to study for a certification exam or read a book that has a more holistic approach into the technology.

Well, while not all of you might agree with this approach of reading the book, certain books can open a completely new perspective into your vision. Of course, there is a risk that over-time, the cloud services described in the book might be phased out, merged or re-named (like, Azure Data Warehouse service got evolution into Azure Synapse Analytics) into some other services.

In addition, hands-on learning is the recommended approach to masterΒ your knowledge and get technical depth into the subject matter area.


Anyway, no matter what approach works best for you, the “Azure Strategy and Implementation Guide 4th Edition” is an essential handbook to cloud transformation with Azure that you don’t want to miss out on.

As it is a common case in technology, there are many different scenarios for running your workloads on Azure to meet your company’s business needs. This book puts renewed emphasis on the importance of using design principles and how crucial planning is – when moving resources to Azure.

The authors of the book use the Microsoft Azure Well-Architected Framework, and recommend to adopting best practices to improve the quality of your workloads in the cloud.

That said, let’s have a look into the chapters:

βœ”οΈ Introduction to Azure
βœ”οΈ Automation and governance in Azure
βœ”οΈ Modernizing with hybrid cloud and multicloud
βœ”οΈ Cloud migration: Planning, implementation, and best practices
βœ”οΈ Enabling secure, remote work with Microsoft Azure AD and WVD
βœ”οΈ Security fundamentals to help protect against cybercrime
βœ”οΈ Offers, support, resources, and tips to optimize cost in Azure

I hope those listing sparkled your interest to read the book.
Well, without any overdue check the download link and put it on your device.

Hopefully, you could get solid Azure cloud understanding from this book and lighten-up your cloud transformation journey.

Fᴏʟʟᴏᴑ ᴍᴇ 🎯 α΄€Ι΄α΄… become α΄€ #cloudmarathoner β›…πŸƒβ€β™‚οΈπŸƒβ€β™€οΈ – 𝐋𝐄𝐓’𝐒 π‚πŽπππ„π‚π“ πŸ‘

#microsoftazure
#cloudskills
#multicloud
#cloudtransformation
#bestpractices
#wellarchitected #framework
#continuouslearning

Start your Azure Certification today with easy steps 1..2..3

TheΒ #tokyoolympics2021Β is over – so you can start your ownΒ #certificationΒ Olympics withΒ MicrosoftΒ Azure forΒ #freeΒ πŸ’ͺπŸš΄β€β™‚οΈπŸš΄β€β™€οΈ

How to get your Azure & Data Fundamentals (AZ-900 + DP-900) β‰πŸ€”

(Attention:Β you could get aΒ free training + Azure exam voucherΒ by the end of this article)

Microsoft Azure is one of the fastest growing cloud solution providers in the world. It has an “Azure Fundamentals” certification – an entry level cloud certification. Candidates for this exam (AZ-900) should have foundational knowledge of cloud services and how those services are provided with Microsoft Azure.

Azure Fundamentals exam is an opportunity to prove knowledge of cloud concepts, core Azure services, Azure pricing, SLA, and lifecycle, and the fundamentals of cloud security, privacy, compliance, and trust.

Are you excited to start your Azure study?

Check these absolutely free resources below and get ready for this exam then πŸ™‚

Well, next step will be the exam registration, that has a $99 cost in the USA. You could take this exam online, proctored through Pearson VUE or other exam providers.

I have a good news for you – for limited time, Microsoft generously provides complementary exam vouchers for its virtual event attendees. Thank you Microsoft for empowering people on their #cloudjourney!

After completing one of these free training below, you’ll be eligible to take theΒ Microsoft Azure Fundamentals certification examΒ at no cost.

Updated with new #free training opportunities + exam

First Option (AZ-900): After completing one of the free training below, you’ll be eligible to take the Microsoft Azure Fundamentals certification exam at no cost.

Second Option (DP-900): Completion of a free Data training below, will make you eligible to take the  Microsoft Azure Data Fundamentals certification exam at no cost.

Well, don’t look further, just register and guarantee your spot for this event and receive your complementary voucher after the event.

Hopefully, these tips will be an encouragement wave to start your #cloudjourney.

Fᴏʟʟᴏᴑ ᴍᴇ 🎯 α΄€Ι΄α΄… become α΄€Β #cloudmarathonerΒ β›…πŸƒβ€β™‚οΈπŸƒβ€β™€οΈ – 𝐋𝐄𝐓’𝐒 π‚πŽπππ„π‚π“ πŸ‘

Good Luck in your first steps!

What is new in Azure Bicep v0.4?

Hello Cloud Marathoners,

I hope everyone getting a chance to enjoy the summer and spend some time with loved once.

That said – Azure Bicep team does not seem slowing down, and I love it!
New features and capabilities have been added to Azure Bicep product v0.4 version, and we will review those innovations on this post.

What is Azure Bicep?

Azure Bicep is a domain-specific language (DSL) that significantly simplifies the Azure resource authoring. It makes representation of your Azure digital estate concise with clean syntax by adding reliable type safety and code-reuse.

A typical Azure Bicep language code for an Azure storage account declaration will look as simple as the following code below – which basically explains why Bicep is called a DSL.

Why would you need it?

There are number of benefits in using Infrastructure-as-Code approach. Azure Bicep might be the right tool for you to use for Azure deployments, especially if you are trying to modernize and simplify the Azure deployment process.

Let’s look into scenarious where Bicep is the right tool to use:

βœ”οΈ Want to use language native to Azure?
βœ”οΈ Looking for fully integrated templates withing Azure platform?
βœ”οΈ Looking for fully supported product with Microsoft?
βœ”οΈ Don’t want to keep or worry about your resource state information
βœ”οΈ Looking to modernize and easy transition from JSON

Well, if your response is YES for above statements/questions then Bicep will be right tool for your solution.

New additions to Azure Bicep in version 0.4

There are numbers of enhancement and features has been added from this release. Let’s look at main Highlights of these features below:

βœ… Linter MVP – The Bicep linter will inspect your code and catch a customizable set of authoring best practices.Β 
βœ… Deprecated parameter modifiers removed – Strip out deprecated parameter modifier syntax
βœ… New code snippets – Suggestion with new code snippets added
βœ… Bug fixes – Number of bug fixes added, thanks to community support
βœ… Bicep Playground fixes – Playground doesn’t load after breaking change.
βœ… Documentation and examples update
βœ… Support for List method call on Azure resource references
βœ… Support for JSON literal string conversion
βœ… Support for using local json templates as modules
βœ… Support for object body completion snippets

What is next?

There are still number of milestones in-front of Bicep team, as the versioning # of Bicep project indicates. That said, starting from Bicep version 0.3 you can get an official Microsoft support.

Below is the sneak-pick preview on what is cooking for v0.5 – which is expected to be out sometimes around August month this year.

Here is an official reference to next milestone on Azure Bicep v0.5.

Thank you for reading till this point. Stay tuned for more Azure Cloud automation and Bicep related posts.

Fᴏʟʟᴏᴑ ᴍᴇ 🎯 α΄€Ι΄α΄… become α΄€ #cloudmarathoner β›…πŸƒβ€β™‚οΈπŸƒβ€β™€οΈ – 𝐋𝐄𝐓’𝐒 π‚πŽπππ„π‚π“ πŸ‘

#microsoftazure
#Bicep
#AzureBicep
#infrastructureascode
#bestpractices
#continuouslearning

What is entitlement management and how it can help?

Hello Cloud Marathoner’s,

We are continuing our cloud learning journey with Azure services today. Last year Azure Active Directory has introduced many useful features and we will talk about one of them that simplifies the identity governance.

“An Azure Active Directory (Azure AD) entitlement management is an identity governance feature that enables organizations to manage identity and access lifecycle at scale, by automating access request workflows, access assignments, reviews, and expiration. ” – Microsoft Azure AD Identity Governance

Entitlement management example with one catalog and two access packages

How can entitlement management help?

There are several ways how you could leverage these features for your Azure resource management activities. The easiest one to get started with is the delegation options:

βœ”οΈ Delegate management of resources from high privileged account to managers
βœ”οΈ Govern access for users in your organization
βœ”οΈ Govern access for users outside your organization
βœ”οΈ Automate and simplify day-2-day management
βœ”οΈ View and report on resource assignments and access packages

Let’s consider following two common scenarios:

First Scenario: As administrator you want to delegate access governance from IT administrators to users who aren’t administrators.
Check out the Video clip for step-by-step guidance.

Second Scenario: You would like to create an automated request process for your users to enable them request for an access package (set of Azure resources and accesses rights) to do their job.

The request process of access packages can be simply understood by a help of a following sample infographic.

A user request for access package (set of resources) to start doing work assignments

When I should use access packages?

It is not a silver bullet, so access packages do not replace other mechanisms for access assignment. However, following use-cases are most appropriate in situations where you would consider them:

  • Employees need time-limited access for a particular task. For example, you might use group-based licensing and a dynamic group to ensure all employees have an Exchange Online mailbox, and then use access packages for situations in which employees need additional access, such as to read departmental resources from another department.
  • Access that requires the approval of an employee’s manager or other designated individuals.
  • Departments wish to manage their own access policies for their resources without IT involvement.
  • Two or more organizations are collaborating on a project, and as a result, multiple users from one organization will need to be brought in via Azure AD B2B to access another organization’s resources.

Thank you for reading till this point. Stay tuned for more Cloud Security and Administration related posts.

Fᴏʟʟᴏᴑ ᴍᴇ 🎯 α΄€Ι΄α΄… become α΄€ #cloudmarathoner β›…πŸƒβ€β™‚οΈπŸƒβ€β™€οΈ – 𝐋𝐄𝐓’𝐒 π‚πŽπππ„π‚π“ πŸ‘

#microsoftazure
#AzureAD
#identitygovernance
#accessmanagement
#secureaccess
#bestpractices
#continuouslearning

Enabling protection of multi-cloud environments from one central?

Hello Cloud Marathoners,

Hybrid-cloud security and protection of digital estate across cloud is very hot topic. But there are very few tools that can cover all different clouds, even though there are myriad of third party and cloud native tools to achieve this mission.

Thus, I have compiled my takeaways on perspective from the latest Microsoft Security blog post and wanted to share back set of tools on Microsoft Azure that could help you achieve management of security poster across clouds.


Microsoft’s Azure security and management tools extend protection to your multi-cloud estate (including other CSPs like AWS, GCP, IBM, etc.)

The followings are the key services that enable it:

βœ”οΈ Azure defender for Servers
βœ”οΈ Azure Security Center
βœ”οΈ Azure Defender for SQL

Let’s start with the Azure Defender for Servers.
What is the Azure Defender for Servers ?

Well, this service leverages Azure Arc to simplify the on-boarding and security of virtual machines running in AWS, GCP, and hybrid clouds.

The Azure Arc projects non-Azure resources into Azure native objects that can be managed and secured with Azure capabilities (Secure Score, Compliance Reporting, Azure Policy, Azure Defender, asset management, etc.)

Next important service visualized on a diagram is Azure Security Center.
Well, what is Azure Security Center?

This service provides a unified multi-cloud view of security posture by integrating AWS Security Hub and GCP Security Command Center detected misconfigurations and findings in Secure Score and Regulatory Compliance Experience.

And finally, let’s review the Azure Defender for SQL.

This managed service constantly monitors your SQL servers for threats, whether they are hosted on-premises, in multi-cloud deployments on Amazon Web Services (AWS), and Google Cloud Platform (GCP), and in virtual machines on Azure.Β 

Looking for more references?

Check out a “Protecting multi-cloud environments with Azure Security Center” blog post on Microsoft blog post.

Fᴏʟʟᴏᴑ ᴍᴇ 🎯 α΄€Ι΄α΄… become α΄€ #cloudmarathoner β›…πŸƒβ€β™‚οΈπŸƒβ€β™€οΈ
#SharingIsCaring❀️️