The first thing that comes to mind when you think of Infrastructure-as-Code (IaC) in Azure is Azure Resource Manager (ARM) templates. After all, for every service – regardless of how you deploy it – an ARM template is created in the background. However, when you think of ARM, you probably also think of JSON files that are difficult to maintain and read. At least that’s what I think.
Microsoft had the same thought as I did. So they launched Project Bicep, a domain specific language (DLS) or mini language. This means that Bicep is designed specifically for declarative development of Azure resources.
Before we dive deeper into Bicep, we will first briefly summarize what Infrastructure-as-Code entails. With IaC, you manage an infrastructure – from networks and virtual machines over databases and more – in a descriptive model. The need for Infrastructure-as-Code was born out of the fact that, in the past, everything was set up manually. This meant that often when changes were made to a virtual machine (VM) , whether consciously or unconsciously, nobody knew about it or no one knew what the change was. Or even worse, a service could accidentally be deleted.
When one of the above situations occurs, the power of IaC becomes clear. With the entire environment and infrastructure stored in descriptive files, the responsible people can easily figure out how a service is configured or, if needed redeploy it with the same settings.
Let’s look at a practical example of IaC in the Azure cloud. Using Bicep, you developed an Azure Data Factory and an Azure Data Lake Gen2 and made it so those can communicate with each other. A colleague modifies a service within your environment thinking it won’t have much of an impact. However, the result is that both your deployed services can no longer communicate with each other. Whereas, you’d usually have to spend some time Sherlock Holmes-ing your way to the cause of the problem. The Bicep file can easily fix your problem by by rebuilding your service from the ground up. You just have to deploy the infrastructure as described in the file and suddenly your solution is working again.
Azure Bicep is a Domain Specific Language (DSL) that provides a more transparent abstraction of ARM. As such, everything that can be done in an ARM template can also be done in this new DSL. All resource types, API versions, properties, and the like that are valid in ARM are also valid in Bicep. However, you cannot push your Bicep file directly to the Azure cloud. When you finish or modify such a file, you need to build and compile it. The build process will then generate an ARM template for you. Afterwards, you can release this template to your Azure environment through, for example, the Azure command-line interface (CLI).
As mentioned earlier, ARM templates – because of their JSON code – are often difficult to maintain. Azure Bicep offers a solution to this by allowing you to more easily and drastically extend your Azure environment thanks to its clear syntax and better support for modularity.
In the images, you can clearly see the difference in complexity between the two. Both codes only deploy a single Azure Data Factory.
© 2023 Kohera
Crafted by
© 2022 Kohera
Crafted by
Cookie | Duration | Description |
---|---|---|
ARRAffinity | session | ARRAffinity cookie is set by Azure app service, and allows the service to choose the right instance established by a user to deliver subsequent requests made by that user. |
ARRAffinitySameSite | session | This cookie is set by Windows Azure cloud, and is used for load balancing to make sure the visitor page requests are routed to the same server in any browsing session. |
cookielawinfo-checkbox-advertisement | 1 year | Set by the GDPR Cookie Consent plugin, this cookie records the user consent for the cookies in the "Advertisement" category. |
cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
CookieLawInfoConsent | 1 year | CookieYes sets this cookie to record the default button state of the corresponding category and the status of CCPA. It works only in coordination with the primary cookie. |
elementor | never | The website's WordPress theme uses this cookie. It allows the website owner to implement or change the website's content in real-time. |
viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |
Cookie | Duration | Description |
---|---|---|
__cf_bm | 30 minutes | Cloudflare set the cookie to support Cloudflare Bot Management. |
pll_language | 1 year | Polylang sets this cookie to remember the language the user selects when returning to the website and get the language information when unavailable in another way. |
Cookie | Duration | Description |
---|---|---|
_ga | 1 year 1 month 4 days | Google Analytics sets this cookie to calculate visitor, session and campaign data and track site usage for the site's analytics report. The cookie stores information anonymously and assigns a randomly generated number to recognise unique visitors. |
_ga_* | 1 year 1 month 4 days | Google Analytics sets this cookie to store and count page views. |
_gat_gtag_UA_* | 1 minute | Google Analytics sets this cookie to store a unique user ID. |
_gid | 1 day | Google Analytics sets this cookie to store information on how visitors use a website while also creating an analytics report of the website's performance. Some of the collected data includes the number of visitors, their source, and the pages they visit anonymously. |
ai_session | 30 minutes | This is a unique anonymous session identifier cookie set by Microsoft Application Insights software to gather statistical usage and telemetry data for apps built on the Azure cloud platform. |
CONSENT | 2 years | YouTube sets this cookie via embedded YouTube videos and registers anonymous statistical data. |
vuid | 1 year 1 month 4 days | Vimeo installs this cookie to collect tracking information by setting a unique ID to embed videos on the website. |
Cookie | Duration | Description |
---|---|---|
ai_user | 1 year | Microsoft Azure sets this cookie as a unique user identifier cookie, enabling counting of the number of users accessing the application over time. |
VISITOR_INFO1_LIVE | 5 months 27 days | YouTube sets this cookie to measure bandwidth, determining whether the user gets the new or old player interface. |
YSC | session | Youtube sets this cookie to track the views of embedded videos on Youtube pages. |
yt-remote-connected-devices | never | YouTube sets this cookie to store the user's video preferences using embedded YouTube videos. |
yt-remote-device-id | never | YouTube sets this cookie to store the user's video preferences using embedded YouTube videos. |
yt.innertube::nextId | never | YouTube sets this cookie to register a unique ID to store data on what videos from YouTube the user has seen. |
yt.innertube::requests | never | YouTube sets this cookie to register a unique ID to store data on what videos from YouTube the user has seen. |
Cookie | Duration | Description |
---|---|---|
WFESessionId | session | No description available. |