{"id":18620,"date":"2022-09-02T09:32:05","date_gmt":"2022-09-02T07:32:05","guid":{"rendered":"https:\/\/www.codemotion.com\/magazine\/?p=18620"},"modified":"2022-09-02T11:03:37","modified_gmt":"2022-09-02T09:03:37","slug":"terraform-vs-bicep-the-differences-between-the-two-azure-tools-that-build-good-infrastructure-code-of-a-program","status":"publish","type":"post","link":"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/terraform-vs-bicep-the-differences-between-the-two-azure-tools-that-build-good-infrastructure-code-of-a-program\/","title":{"rendered":"Terraform vs. Bicep: The Differences Between the Two Azure Tools That Build Good Infrastructure Code"},"content":{"rendered":"\n<p>Choosing between Azure tools? Having a <strong>traditional version-controlled code<\/strong> made maintaining a consistent underlying infrastructure that deals with multiple environments like development, staging, and production challenging for a long time. There\u2019s a tendency for those environments to drift out of sync unless they\u2019re maintained manually, and that can cause problems further down the line.&nbsp;<\/p>\n\n\n\n<p>Enter the concept of infrastructure defined as code.<\/p>\n\n\n\n<p>Cloud-based solutions from modern machine learning tools to <a href=\"https:\/\/www.globalapptesting.com\/blog\/automated-qa-testing\">automated QA testing software<\/a> offer advantages in terms of everyday functionality. It\u2019s no surprise that as these have become more popular, <strong>Infrastructure as Code (IaC) tools<\/strong> have begun to take off.<\/p>\n\n\n\n<p>In this article, we\u2019ll look at two of the most popular Azure tools\u2013 Terraform and Bicep \u2013 with particular reference to how well each of them gets along with the Azure cloud computing platform.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-is-infrastructure-as-code\">What Is Infrastructure as Code?<\/h2>\n\n\n\n<p>The growing popularity of <a href=\"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/cloud-adoption-strategy\/\" class=\"ek-link\">cloud adoption strategies<\/a> has been instrumental in the increasing relevance of IaC. That\u2019s because, <strong>in public cloud environments, developers can\u2019t access the underlying infrastructure.<\/strong> Instead, cloud providers offer console-based interfaces to allow you to work with the resources you need.<\/p>\n\n\n\n<p>IaC involves describing infrastructure using code blocks, so it\u2019s a convenient way of working in this context. Interacting with this infrastructure programmatically precludes the need to use the GUI console. What this means is that actions can be performed and resources created and configured in an automated way, including vital ones such as <a href=\"https:\/\/www.cybersecurity-insiders.com\/what-you-need-to-know-about-the-role-of-patch-management-for-cyber-security\/\">patch management<\/a>.<\/p>\n\n\n\n<p>The code is declarative, meaning you determine which form you would like the infrastructure to take, and the code implements your decision.<\/p>\n\n\n\n<p>If you consider the kinds of use cases <a href=\"https:\/\/databricks.com\/glossary\/hadoop\">Apache Hadoop is used for<\/a>, you can see that this sort of infrastructure automation is a modern marvel. The wide variety of configurations and resources deployed on the cloud is a testament to the flexibility of this approach. But it also means that sometimes, infrastructure needs to be scaled, provisioned, or destroyed \u2013 much more complex jobs if you don\u2019t have an IaC solution available.<\/p>\n\n\n\n<p>The benefits of IaC don\u2019t end there, though. Another big plus is that it makes versioning possible: you can version changes to the code. In practice, this also means that you can capture versions of the infrastructure itself, using a version control tool to track changes.<\/p>\n\n\n\n<p>This incredibly useful functionality was never possible when working with physical infrastructures and represents a real step forward. It also makes it much easier to implement downstream processes such as <a href=\"https:\/\/www.computer.org\/publications\/tech-news\/trends\/data-orchestration-meaning\">data orchestration<\/a> and the flexibility and adaptability it offers are not to be sniffed at.&nbsp;&nbsp;&nbsp;<\/p>\n\n\n\n<p>So let\u2019s look at the first IaC tools we\u2019re considering here: Hashicorp\u2019s Terraform.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"614\" src=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/12\/cloud-computing-4246668_1920_0dab0fb89f1af3bff93bad79f7732ef6_2000-1024x614.jpg\" alt=\"A first web app on Microsoft Azure\" class=\"wp-image-1903\" srcset=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/12\/cloud-computing-4246668_1920_0dab0fb89f1af3bff93bad79f7732ef6_2000-1024x614.jpg 1024w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/12\/cloud-computing-4246668_1920_0dab0fb89f1af3bff93bad79f7732ef6_2000-300x180.jpg 300w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/12\/cloud-computing-4246668_1920_0dab0fb89f1af3bff93bad79f7732ef6_2000-768x461.jpg 768w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/12\/cloud-computing-4246668_1920_0dab0fb89f1af3bff93bad79f7732ef6_2000.jpg 1125w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-hashicorp-terraform\">Hashicorp Terraform&nbsp;<\/h2>\n\n\n\n<p>Hashicorp Terraform is <strong>one of the best-known IaC languages in widespread use today<\/strong>. The open-source tool is free to download from the Hashicorp site. It allows you to write declarative IaC using configuration files in Hashicorp Configuration Language (HCL).&nbsp;<\/p>\n\n\n\n<p>Terraform has been downloaded over 100 million times, and it\u2019s easy to see why. Its syntax is very intuitive and developer-friendly, so you can quickly pick it up and get started without wasting too much time. Even if you\u2019re working with <strong>complex infrastructures<\/strong>, you can write them in a way that is straightforward and easily readable to other humans\u2014which is always good news.&nbsp;<\/p>\n\n\n\n<p>Terraform works by generating an \u201cexecution plan.\u201d This plan sets out what is necessary for Terraform to create a described state of infrastructure from the configuration files. Terraform tracks the changes to the infrastructure and adapts new execution plans to make incremental improvements. The kinds of infrastructure it can be used for include (but are not limited to):&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Storage&nbsp;<\/li><li>Networking&nbsp;<\/li><li>Compute<\/li><li>PaaS<\/li><li>SaaS<\/li><li>DNS<\/li><li>Other <a href=\"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/tackling-complex-cloud-architectures\/\" class=\"ek-link\">complex cloud architectures<\/a><\/li><\/ul>\n\n\n\n<p>There are a few concepts it\u2019s useful to know about when you\u2019re getting to grips with Terraform.&nbsp;<\/p>\n\n\n\n<p><strong>Resources:<\/strong> a fundamental concept in the Terraform language, this refers to anything which describes an infrastructure object such as a DNS record or a virtual network.&nbsp;<\/p>\n\n\n\n<p><strong>State:<\/strong> the state information maps real-world resources to your configuration. It tracks metadata and decides which changes to make to resources to improve infrastructure performance.<\/p>\n\n\n\n<p><strong>Providers:<\/strong> Your plugins. In other words, you tell Terraform which technologies it will need to interact with your infrastructure according to the specific code you\u2019re using, and Terraform pulls them down during the initialisation stage.&nbsp;<\/p>\n\n\n\n<p><strong>Modules:<\/strong> a group of .tf or tf.json files stored in the same directory that are often used together.<\/p>\n\n\n\n<p>Part of the appeal of Terraform is the fact that it\u2019s host-agnostic and, therefore, can be adapted for use with many different platforms. You can deploy Terraform IaC with all aspects of <a href=\"https:\/\/databricks.com\/glossary\/hadoop-ecosystem\">Hadoop components<\/a> and the results will be scalable and flexible.&nbsp;<\/p>\n\n\n\n<p>If you\u2019re working with Azure, it\u2019s good to know that Terraform does have support for it. However, it\u2019s possible too that you may prefer a native solution, in which case you might be looking at Microsoft Bicep.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-microsoft-bicep\">Microsoft Bicep<\/h2>\n\n\n\n<p>At base, <strong>Microsoft\u2019s Azure Bicep<\/strong> is a transpiler. That\u2019s to say, it takes code written in a new language and translates it into another at the same level of abstraction. In this case, that means translating it into the <strong>Azure Resource Manager<\/strong> (ARM) templates you are already familiar with. Because it\u2019s a native solution, you can be 100% certain that it will be able to access any service you need to use in Azure from the very beginning.&nbsp;<\/p>\n\n\n\n<p>It is a Domain Specific Language that you can use to deploy Azure resources declaratively. State management works differently in Bicep than in Terraform. While Terraform uses .tfstate files, Bicep performs a direct query on Azure to determine the difference locally between the current resources and the desired state from the Bicep files.<\/p>\n\n\n\n<p>This means you don\u2019t have to keep up with state data as you do with Terraform. Deployment and management are curated using the ARM. Of course, it might occur to you to wonder why you wouldn\u2019t just use ARM templates natively rather than involving Bicep. The reason is that the Bicep syntax is much more intuitive to read and makes the entire process easier.<\/p>\n\n\n\n<p>Of course, one standout difference between Bicep and Terraform is that Bicep is an Azure-only platform. That\u2019s fine if you\u2019re simply working in Azure, but it\u2019s worth looking more closely at some of the differences between these two IaC tools.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-differences-between-terraform-and-bicep\">Differences Between Terraform and Bicep<\/h2>\n\n\n\n<p>Any <a href=\"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/what-is-cloud-first-strategy-and-how-can-you-benefit-from-it\/\">cloud-first strategy<\/a> will involve choices, and the choices made have to be relevant to the resources available and the goals of your project. So it\u2019s crucial to be aware of the principal differences between Terraform and Bicep.<\/p>\n\n\n\n<p><strong>Platform support:<\/strong> The most apparent difference. As we\u2019ve already seen, Bicep is Azure-specific, whereas Terraform is host-agnostic.<\/p>\n\n\n\n<p><strong>Native Azure services integration:<\/strong> This is a plus with Bicep if Azure is what you\u2019re working with. Terraform does offer support for Azure, but not to the same level.<\/p>\n\n\n\n<p><strong>Maintaining state data:<\/strong> In Bicep, state data is maintained within Azure, whereas with Terraform, it is stored locally or in a cloud.<\/p>\n\n\n\n<p><strong>Community support:<\/strong> Terraform is the undisputed winner here. If you\u2019re <a href=\"https:\/\/databricks.com\/glossary\/pandas-dataframe\">working with Pandas DataFrames<\/a> and you suddenly find you have an obscure issue with Terraform, someone in the community will be able to suggest the code you need. On the other hand, Bicep is relatively new, so that level of mutual support isn\u2019t quite available yet.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-azure-tools-which-is-better-terraform-or-bicep\">Azure Tools, Which Is Better? Terraform or Bicep<\/h2>\n\n\n\n<p>Only you can decide. A lot will depend on the nature of your organisation and its operational aims. If you\u2019re working for a DevOps consultancy, you\u2019re going to be facing very different considerations than if you work for a trade company implementing <a href=\"https:\/\/www.brightpearl.com\/wholesale-management\">wholesale warehouse management<\/a>. The use cases matter.<\/p>\n\n\n\n<p>One aspect to consider is how much critical infrastructure is being run on multiple clouds. If it\u2019s a lot, then the answer is easy. Go with Terraform; its support for over a hundred different providers means it\u2019s ready to go when dealing with communicating with multiple clouds.<\/p>\n\n\n\n<p>The fact that Terraform has been around longer also means it\u2019s had time to develop to a greater level of maturity. It\u2019s a tried and tested product, and for many organisations, that will make it a safe choice.<\/p>\n\n\n\n<p>Nevertheless, you should not discount Bicep. Microsoft is working on equipping it with multi-cloud support, so watch this space. If you\u2019re looking to implement a solution from scratch and you\u2019re using Azure infrastructure, Bicep could be perfect for your needs. After all, it uses a simple language that permits you to condense the native ARM JSON templates exponentially and is already well integrated with all Azure services.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-codemotion-magazine wp-block-embed-codemotion-magazine\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"drcMnrw4dz\"><a href=\"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/aws-vs-azure-cost-comparison\/\">AWS vs. Azure Cost Comparison [2022]<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;AWS vs. Azure Cost Comparison [2022]&#8221; &#8212; Codemotion Magazine\" src=\"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/aws-vs-azure-cost-comparison\/embed\/#?secret=cjegKQaj6Y#?secret=drcMnrw4dz\" data-secret=\"drcMnrw4dz\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-decisions-decisions\">Decisions, Decisions\u2026<\/h2>\n\n\n\n<p>Both azure tools are excellent at what they do. The advent of Infrastructure as Code has led to a sea-change in DevOps that has opened up all kinds of avenues for innovation. Whichever you decide to go with, you can be sure that you\u2019re using one of the best top-end tools available to support your organisation\u2019s cloud infrastructure and its development pipeline.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/extra.codemotion.com\/ovhcloud-white-paper-lessons-learned-in-the-cloud\/\" target=\"_blank\" rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"200\" src=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/08\/OVH-white-paper_NL-700x200-1.png\" alt=\"\" class=\"wp-image-18648\" srcset=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/08\/OVH-white-paper_NL-700x200-1.png 700w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/08\/OVH-white-paper_NL-700x200-1-300x86.png 300w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/a><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Choosing between Azure tools? Having a traditional version-controlled code made maintaining a consistent underlying infrastructure that deals with multiple environments like development, staging, and production challenging for a long time. There\u2019s a tendency for those environments to drift out of sync unless they\u2019re maintained manually, and that can cause problems further down the line.&nbsp; Enter&#8230; <a class=\"more-link\" href=\"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/terraform-vs-bicep-the-differences-between-the-two-azure-tools-that-build-good-infrastructure-code-of-a-program\/\">Read more<\/a><\/p>\n","protected":false},"author":147,"featured_media":18626,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_editorskit_title_hidden":false,"_editorskit_reading_time":6,"_editorskit_is_block_options_detached":false,"_editorskit_block_options_position":"{}","_uag_custom_page_level_css":"","_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[5244],"tags":[4139,7224],"collections":[],"class_list":{"0":"post-18620","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-cloud","8":"tag-azure","9":"tag-terraform","10":"entry"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.9 (Yoast SEO v26.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Azure Tools: Terraform and Bicep Compared - Codemotion Magazine<\/title>\n<meta name=\"description\" content=\"Learn the differences between Terraform and Bicep, the main Azure tools for building good infrastructure code. Read on to discover more!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/terraform-vs-bicep-the-differences-between-the-two-azure-tools-that-build-good-infrastructure-code-of-a-program\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Terraform vs. Bicep: The Differences Between the Two Azure Tools That Build Good Infrastructure Code\" \/>\n<meta property=\"og:description\" content=\"Learn the differences between Terraform and Bicep, the main Azure tools for building good infrastructure code. Read on to discover more!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/terraform-vs-bicep-the-differences-between-the-two-azure-tools-that-build-good-infrastructure-code-of-a-program\/\" \/>\n<meta property=\"og:site_name\" content=\"Codemotion Magazine\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Codemotion.Italy\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-09-02T07:32:05+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-09-02T09:03:37+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/08\/fc23638c-16f6-4437-8662-213f37f2a1dc-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"6000\" \/>\n\t<meta property=\"og:image:height\" content=\"3375\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Pohan Lin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@CodemotionIT\" \/>\n<meta name=\"twitter:site\" content=\"@CodemotionIT\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Pohan Lin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/terraform-vs-bicep-the-differences-between-the-two-azure-tools-that-build-good-infrastructure-code-of-a-program\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/terraform-vs-bicep-the-differences-between-the-two-azure-tools-that-build-good-infrastructure-code-of-a-program\/\"},\"author\":{\"name\":\"Pohan Lin\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/c160cbd1f9c52359651eb105e9908eb0\"},\"headline\":\"Terraform vs. Bicep: The Differences Between the Two Azure Tools That Build Good Infrastructure Code\",\"datePublished\":\"2022-09-02T07:32:05+00:00\",\"dateModified\":\"2022-09-02T09:03:37+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/terraform-vs-bicep-the-differences-between-the-two-azure-tools-that-build-good-infrastructure-code-of-a-program\/\"},\"wordCount\":1570,\"publisher\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/terraform-vs-bicep-the-differences-between-the-two-azure-tools-that-build-good-infrastructure-code-of-a-program\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/08\/fc23638c-16f6-4437-8662-213f37f2a1dc-1.png\",\"keywords\":[\"Azure\",\"Terraform\"],\"articleSection\":[\"Cloud\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/terraform-vs-bicep-the-differences-between-the-two-azure-tools-that-build-good-infrastructure-code-of-a-program\/\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/terraform-vs-bicep-the-differences-between-the-two-azure-tools-that-build-good-infrastructure-code-of-a-program\/\",\"name\":\"Azure Tools: Terraform and Bicep Compared - Codemotion Magazine\",\"isPartOf\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/terraform-vs-bicep-the-differences-between-the-two-azure-tools-that-build-good-infrastructure-code-of-a-program\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/terraform-vs-bicep-the-differences-between-the-two-azure-tools-that-build-good-infrastructure-code-of-a-program\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/08\/fc23638c-16f6-4437-8662-213f37f2a1dc-1.png\",\"datePublished\":\"2022-09-02T07:32:05+00:00\",\"dateModified\":\"2022-09-02T09:03:37+00:00\",\"description\":\"Learn the differences between Terraform and Bicep, the main Azure tools for building good infrastructure code. Read on to discover more!\",\"breadcrumb\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/terraform-vs-bicep-the-differences-between-the-two-azure-tools-that-build-good-infrastructure-code-of-a-program\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/terraform-vs-bicep-the-differences-between-the-two-azure-tools-that-build-good-infrastructure-code-of-a-program\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/terraform-vs-bicep-the-differences-between-the-two-azure-tools-that-build-good-infrastructure-code-of-a-program\/#primaryimage\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/08\/fc23638c-16f6-4437-8662-213f37f2a1dc-1.png\",\"contentUrl\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/08\/fc23638c-16f6-4437-8662-213f37f2a1dc-1.png\",\"width\":6000,\"height\":3375,\"caption\":\"azure tools\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/terraform-vs-bicep-the-differences-between-the-two-azure-tools-that-build-good-infrastructure-code-of-a-program\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.codemotion.com\/magazine\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"DevOps\",\"item\":\"https:\/\/www.codemotion.com\/magazine\/devops\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Cloud\",\"item\":\"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Terraform vs. Bicep: The Differences Between the Two Azure Tools That Build Good Infrastructure Code\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#website\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/\",\"name\":\"Codemotion Magazine\",\"description\":\"We code the future. Together\",\"publisher\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.codemotion.com\/magazine\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#organization\",\"name\":\"Codemotion\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png\",\"contentUrl\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png\",\"width\":225,\"height\":225,\"caption\":\"Codemotion\"},\"image\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/Codemotion.Italy\/\",\"https:\/\/x.com\/CodemotionIT\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/c160cbd1f9c52359651eb105e9908eb0\",\"name\":\"Pohan Lin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/bfd1d2c6b4754a561bc1bce5137a9376380f436b75a10e2ee06a1ae59bce472c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/bfd1d2c6b4754a561bc1bce5137a9376380f436b75a10e2ee06a1ae59bce472c?s=96&d=mm&r=g\",\"caption\":\"Pohan Lin\"},\"description\":\"Pohan Lin is the Senior Web Marketing and Localizations Manager at Databricks. Databricks is a global AI and AutoML open source provider connecting the features of data warehouses and data lakes to create lakehouse architecture. With over 18 years of experience in web marketing, online SaaS business and ecommerce growth, Pohan is passionate about innovation and is dedicated to communicating the significant impact data has in marketing. Pohan Lin also published articles for domains such as SME-News. Here is Pohan\u2019s LinkedIn.\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/pohan-lin-7ba9\/\"],\"url\":\"https:\/\/www.codemotion.com\/magazine\/author\/pohan-lin\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Azure Tools: Terraform and Bicep Compared - Codemotion Magazine","description":"Learn the differences between Terraform and Bicep, the main Azure tools for building good infrastructure code. Read on to discover more!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/terraform-vs-bicep-the-differences-between-the-two-azure-tools-that-build-good-infrastructure-code-of-a-program\/","og_locale":"en_US","og_type":"article","og_title":"Terraform vs. Bicep: The Differences Between the Two Azure Tools That Build Good Infrastructure Code","og_description":"Learn the differences between Terraform and Bicep, the main Azure tools for building good infrastructure code. Read on to discover more!","og_url":"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/terraform-vs-bicep-the-differences-between-the-two-azure-tools-that-build-good-infrastructure-code-of-a-program\/","og_site_name":"Codemotion Magazine","article_publisher":"https:\/\/www.facebook.com\/Codemotion.Italy\/","article_published_time":"2022-09-02T07:32:05+00:00","article_modified_time":"2022-09-02T09:03:37+00:00","og_image":[{"width":6000,"height":3375,"url":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/08\/fc23638c-16f6-4437-8662-213f37f2a1dc-1.png","type":"image\/png"}],"author":"Pohan Lin","twitter_card":"summary_large_image","twitter_creator":"@CodemotionIT","twitter_site":"@CodemotionIT","twitter_misc":{"Written by":"Pohan Lin","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/terraform-vs-bicep-the-differences-between-the-two-azure-tools-that-build-good-infrastructure-code-of-a-program\/#article","isPartOf":{"@id":"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/terraform-vs-bicep-the-differences-between-the-two-azure-tools-that-build-good-infrastructure-code-of-a-program\/"},"author":{"name":"Pohan Lin","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/c160cbd1f9c52359651eb105e9908eb0"},"headline":"Terraform vs. Bicep: The Differences Between the Two Azure Tools That Build Good Infrastructure Code","datePublished":"2022-09-02T07:32:05+00:00","dateModified":"2022-09-02T09:03:37+00:00","mainEntityOfPage":{"@id":"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/terraform-vs-bicep-the-differences-between-the-two-azure-tools-that-build-good-infrastructure-code-of-a-program\/"},"wordCount":1570,"publisher":{"@id":"https:\/\/www.codemotion.com\/magazine\/#organization"},"image":{"@id":"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/terraform-vs-bicep-the-differences-between-the-two-azure-tools-that-build-good-infrastructure-code-of-a-program\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/08\/fc23638c-16f6-4437-8662-213f37f2a1dc-1.png","keywords":["Azure","Terraform"],"articleSection":["Cloud"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/terraform-vs-bicep-the-differences-between-the-two-azure-tools-that-build-good-infrastructure-code-of-a-program\/","url":"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/terraform-vs-bicep-the-differences-between-the-two-azure-tools-that-build-good-infrastructure-code-of-a-program\/","name":"Azure Tools: Terraform and Bicep Compared - Codemotion Magazine","isPartOf":{"@id":"https:\/\/www.codemotion.com\/magazine\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/terraform-vs-bicep-the-differences-between-the-two-azure-tools-that-build-good-infrastructure-code-of-a-program\/#primaryimage"},"image":{"@id":"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/terraform-vs-bicep-the-differences-between-the-two-azure-tools-that-build-good-infrastructure-code-of-a-program\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/08\/fc23638c-16f6-4437-8662-213f37f2a1dc-1.png","datePublished":"2022-09-02T07:32:05+00:00","dateModified":"2022-09-02T09:03:37+00:00","description":"Learn the differences between Terraform and Bicep, the main Azure tools for building good infrastructure code. Read on to discover more!","breadcrumb":{"@id":"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/terraform-vs-bicep-the-differences-between-the-two-azure-tools-that-build-good-infrastructure-code-of-a-program\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/terraform-vs-bicep-the-differences-between-the-two-azure-tools-that-build-good-infrastructure-code-of-a-program\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/terraform-vs-bicep-the-differences-between-the-two-azure-tools-that-build-good-infrastructure-code-of-a-program\/#primaryimage","url":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/08\/fc23638c-16f6-4437-8662-213f37f2a1dc-1.png","contentUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/08\/fc23638c-16f6-4437-8662-213f37f2a1dc-1.png","width":6000,"height":3375,"caption":"azure tools"},{"@type":"BreadcrumbList","@id":"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/terraform-vs-bicep-the-differences-between-the-two-azure-tools-that-build-good-infrastructure-code-of-a-program\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.codemotion.com\/magazine\/"},{"@type":"ListItem","position":2,"name":"DevOps","item":"https:\/\/www.codemotion.com\/magazine\/devops\/"},{"@type":"ListItem","position":3,"name":"Cloud","item":"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/"},{"@type":"ListItem","position":4,"name":"Terraform vs. Bicep: The Differences Between the Two Azure Tools That Build Good Infrastructure Code"}]},{"@type":"WebSite","@id":"https:\/\/www.codemotion.com\/magazine\/#website","url":"https:\/\/www.codemotion.com\/magazine\/","name":"Codemotion Magazine","description":"We code the future. Together","publisher":{"@id":"https:\/\/www.codemotion.com\/magazine\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.codemotion.com\/magazine\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.codemotion.com\/magazine\/#organization","name":"Codemotion","url":"https:\/\/www.codemotion.com\/magazine\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/","url":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png","contentUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png","width":225,"height":225,"caption":"Codemotion"},"image":{"@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/Codemotion.Italy\/","https:\/\/x.com\/CodemotionIT"]},{"@type":"Person","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/c160cbd1f9c52359651eb105e9908eb0","name":"Pohan Lin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/bfd1d2c6b4754a561bc1bce5137a9376380f436b75a10e2ee06a1ae59bce472c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/bfd1d2c6b4754a561bc1bce5137a9376380f436b75a10e2ee06a1ae59bce472c?s=96&d=mm&r=g","caption":"Pohan Lin"},"description":"Pohan Lin is the Senior Web Marketing and Localizations Manager at Databricks. Databricks is a global AI and AutoML open source provider connecting the features of data warehouses and data lakes to create lakehouse architecture. With over 18 years of experience in web marketing, online SaaS business and ecommerce growth, Pohan is passionate about innovation and is dedicated to communicating the significant impact data has in marketing. Pohan Lin also published articles for domains such as SME-News. Here is Pohan\u2019s LinkedIn.","sameAs":["https:\/\/www.linkedin.com\/in\/pohan-lin-7ba9\/"],"url":"https:\/\/www.codemotion.com\/magazine\/author\/pohan-lin\/"}]}},"featured_image_src":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/08\/fc23638c-16f6-4437-8662-213f37f2a1dc-1-600x400.png","featured_image_src_square":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/08\/fc23638c-16f6-4437-8662-213f37f2a1dc-1-600x600.png","author_info":{"display_name":"Pohan Lin","author_link":"https:\/\/www.codemotion.com\/magazine\/author\/pohan-lin\/"},"uagb_featured_image_src":{"full":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/08\/fc23638c-16f6-4437-8662-213f37f2a1dc-1.png",6000,3375,false],"thumbnail":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/08\/fc23638c-16f6-4437-8662-213f37f2a1dc-1-150x150.png",150,150,true],"medium":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/08\/fc23638c-16f6-4437-8662-213f37f2a1dc-1-300x169.png",300,169,true],"medium_large":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/08\/fc23638c-16f6-4437-8662-213f37f2a1dc-1-768x432.png",768,432,true],"large":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/08\/fc23638c-16f6-4437-8662-213f37f2a1dc-1-1024x576.png",1024,576,true],"1536x1536":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/08\/fc23638c-16f6-4437-8662-213f37f2a1dc-1-1536x864.png",1536,864,true],"2048x2048":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/08\/fc23638c-16f6-4437-8662-213f37f2a1dc-1-2048x1152.png",2048,1152,true],"small-home-featured":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/08\/fc23638c-16f6-4437-8662-213f37f2a1dc-1.png",100,56,false],"sidebar-featured":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/08\/fc23638c-16f6-4437-8662-213f37f2a1dc-1-180x128.png",180,128,true],"genesis-singular-images":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/08\/fc23638c-16f6-4437-8662-213f37f2a1dc-1-896x504.png",896,504,true],"archive-featured":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/08\/fc23638c-16f6-4437-8662-213f37f2a1dc-1-400x225.png",400,225,true],"gb-block-post-grid-landscape":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/08\/fc23638c-16f6-4437-8662-213f37f2a1dc-1-600x400.png",600,400,true],"gb-block-post-grid-square":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/08\/fc23638c-16f6-4437-8662-213f37f2a1dc-1-600x600.png",600,600,true]},"uagb_author_info":{"display_name":"Pohan Lin","author_link":"https:\/\/www.codemotion.com\/magazine\/author\/pohan-lin\/"},"uagb_comment_info":0,"uagb_excerpt":"Choosing between Azure tools? Having a traditional version-controlled code made maintaining a consistent underlying infrastructure that deals with multiple environments like development, staging, and production challenging for a long time. There\u2019s a tendency for those environments to drift out of sync unless they\u2019re maintained manually, and that can cause problems further down the line.&nbsp; Enter&#8230;&hellip;","lang":"en","_links":{"self":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts\/18620","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/users\/147"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/comments?post=18620"}],"version-history":[{"count":7,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts\/18620\/revisions"}],"predecessor-version":[{"id":18673,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts\/18620\/revisions\/18673"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/media\/18626"}],"wp:attachment":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/media?parent=18620"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/categories?post=18620"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/tags?post=18620"},{"taxonomy":"collections","embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/collections?post=18620"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}