{"componentChunkName":"component---src-templates-tags-js","path":"/tags/bicep/","result":{"data":{"allMarkdownRemark":{"totalCount":2,"edges":[{"node":{"id":"449ed026-ecf9-5f5f-8e70-45b60f61a21f","html":"<p>I’ve contributed to the development community in many ways, be it speaking at conferences, writing technical blog posts, getting involved in conferences as volunteer or part of the crew, or helping with Hackatons and Open Hacks. However, writing a book has been in my todo list for quite a while, and honestly, I’ve been afraid to start due to various reasons, mainly because I heard how much time and energy you need to put into it.</p>\n<p>Regardless, I set it as a goal in 2021 and after a few months working on it, voila, <a href=\"https://www.amazon.com/author/yas\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">it’s now listed on Amazon</a> to be published early next year. I am so excited about it and thought to share my experience and how I reached this milestone.</p>\n<!--more-->\n<h2 id=\"why-would-you-want-to-write-a-book\" style=\"position:relative;\"><a href=\"#why-would-you-want-to-write-a-book\" aria-label=\"why would you want to write a book permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Why would you want to write a book?</h2>\n<p>Writing a book might seem like a far fetched goal, in fact there are many smart and talented people out there writing great technical books on various topics which become best sellers. So you might be asking yourself why would I even think about it.</p>\n<p>However, before we go further let me tell you a few things:</p>\n<ul>\n<li>Anyone can learn to write a book, and I mean anyone!</li>\n<li>If you like writing technical content, be it blog posts or even documentation, you can pull this off easier than you think.</li>\n</ul>\n<p>So let’s go back to why you should write a book. I would share my own reasons, but you might find them relatable too.</p>\n<h3 id=\"sharing-your-knowledge-with-others\" style=\"position:relative;\"><a href=\"#sharing-your-knowledge-with-others\" aria-label=\"sharing your knowledge with others permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Sharing your knowledge with others</h3>\n<p>You might be good in a subject and have worked with it for a long time. You might even not have worked with it but be very passionate about it and wanted to share what you learn with others to help them succeed. For this exact reason, I believe it’s important to think about writing a book if you have enough in your mind to make it work.</p>\n<p>I have read books before and they have helped me reach where I am because I’ve always progressed as a self-thought individual rather than being academic or even as a trainee. So it was important for me to give it back somehow and finally it happened, think about it.</p>\n<h3 id=\"it-would-add-to-your-credit-professionally\" style=\"position:relative;\"><a href=\"#it-would-add-to-your-credit-professionally\" aria-label=\"it would add to your credit professionally permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>It would add to your credit professionally</h3>\n<p>From a professional perspective, writing a book will add to your creditability and establish you as an expert in that field. Who knows, it might also help you land a great job, think about your interviewer when you tell them you have a book on the subject and how positively it can affect the process.</p>\n<h3 id=\"ticking-a-box-accomplishing-a-new-goal\" style=\"position:relative;\"><a href=\"#ticking-a-box-accomplishing-a-new-goal\" aria-label=\"ticking a box accomplishing a new goal permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Ticking a box, accomplishing a new goal</h3>\n<p>If you have a todo list and have some goals for yourself, why not put writing a book in there too. Think about how accomplished you feel when you actually do it. You will tackle a new challenge and prove to yourself that nothing is impossible if you put your energy into it.</p>\n<h3 id=\"you-will-learn-a-lot\" style=\"position:relative;\"><a href=\"#you-will-learn-a-lot\" aria-label=\"you will learn a lot permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>You will learn a lot</h3>\n<p>Writing a book can help you learn a lot in a specific subject. When you are writing a book, it becomes important that you validate your knowledge and back everything with facts and data. During this process you will learn new things in every step of the way and that to me is worth all the time and energy you put into it.</p>\n<h3 id=\"you-might-make-money\" style=\"position:relative;\"><a href=\"#you-might-make-money\" aria-label=\"you might make money permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>You might make money</h3>\n<p>Not every goal is about money, but if you can make a few extra bucks publishing your book, why not. You have put your time on it and getting rewards in form of a currency (😎) can be very helpful to anybody.</p>\n<p>Now that I mentioned my reasons, think about what else and let me know, I am keen to hear yours too. Enough about reasons, let’s talk about the process.</p>\n<h2 id=\"the-uhowu\" style=\"position:relative;\"><a href=\"#the-uhowu\" aria-label=\"the uhowu permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>The <u>HOW</u></h2>\n<p>It is no secret that writing a book requires discipline and good time management. But let me tell you it needs a little bit more than that, in my case anyway. You might have to put extra effort or be a bit more proficient than me, so take this with a grain of salt.</p>\n<h3 id=\"finding-a-topic\" style=\"position:relative;\"><a href=\"#finding-a-topic\" aria-label=\"finding a topic permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Finding a topic</h3>\n<p>First thing you need to do is to find a topic, but you can’t find any topic. You need to find something that you’re good at it, and you really believe it’s important to share it with others. In my case <a href=\"https://docs.microsoft.com/en-us/azure/azure-resource-manager/bicep/overview\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Azure Bicep</a> is a new tool, there are not many books written on it, and I am really passionate about how it can help people achieve more by doing less.</p>\n<blockquote>\n<p>If you want to publish your book, you also need to find a topic where there are not many books available by other writers on it.</p>\n</blockquote>\n<h3 id=\"form-an-outline\" style=\"position:relative;\"><a href=\"#form-an-outline\" aria-label=\"form an outline permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Form an outline</h3>\n<p>It’s important to have an outline to be able to tell a story. Yes, you heard me right, even a technical book needs a story if you want it to be effective. You need a <em>beginning</em>, <em>middle</em> and <em>end</em> which takes your readers on a journey. Start with simples, then move to advanced areas and then finish off by some best practices or something that compliments your points and helps them a few extra steps.</p>\n<h3 id=\"read-it-yourself\" style=\"position:relative;\"><a href=\"#read-it-yourself\" aria-label=\"read it yourself permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Read it yourself</h3>\n<p>I can’t emphasis enough how important it is to read what you write first. If you feel you’re biased, get somebody else to read it and give you feedback. Sometimes we don’t realise how we fall into trap of making assumptions and the book turns out to be useless because of that.</p>\n<h3 id=\"set-a-schedule\" style=\"position:relative;\"><a href=\"#set-a-schedule\" aria-label=\"set a schedule permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Set a schedule</h3>\n<p>If you are a full time employee like me, you need to set a schedule for yourself and make it a habit. Lock it in your calendar and make sure it’s a time with minimal disruptions. I used one hour every night from 10pm to 11pm when my kids were in bed and I had already finished my dad duties. But I kept it like that for 4 months until I finished the book and boy that helps.</p>\n<p>If that doesn’t work for you, you can set a goal for how many words need to write each day, week, months, etc.</p>\n<h3 id=\"use-writing-tools\" style=\"position:relative;\"><a href=\"#use-writing-tools\" aria-label=\"use writing tools permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Use writing tools</h3>\n<p>Books are different that blog posts in a sense that they need to be credible. Having grammar errors or spelling mistakes will look really bad, so use a software which helps you proofread your writing.</p>\n<p>And that’s all I did to be able to be here writing this post.</p>\n<h2 id=\"finishing-touches\" style=\"position:relative;\"><a href=\"#finishing-touches\" aria-label=\"finishing touches permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Finishing touches</h2>\n<p>It can become a really hard job even from start, so keep yourself motivated. If you face any setbacks or challenges, try to positively face them and work your way around solving those slowly and steadily.</p>\n<p>Reward yourself, give yourself a little treat at the end of every chapter, or section. This definitely helped me, so it will probably help you too.</p>\n<p>I hope this has motivated you to at list think about the possibility of wiring a book. Anyway, I didn’t talk about the book itself, so read on.</p>\n<h2 id=\"about-my-book\" style=\"position:relative;\"><a href=\"#about-my-book\" aria-label=\"about my book permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>About my book</h2>\n<p><a href=\"https://www.amazon.com/gp/product/B09MFY582M/ref=dbs_a_def_rwt_bibl_vppi_i0\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Infrastructure as code with Azure Bicep</a> is a book which takes you on a journey from what Azure Bicep is, to how it works and its syntax. Then you learn about all the bits and pieces to be able to write maintainable, reusable, modular templates to be able to deploy your resources into your Azure environment with confidence. It also covers the authoring experience and how amazing it is to work with it from Visual Studio Code and its extension.</p>\n<p>Then it covers how to use it in your CI/CD pipelines both on Azure DevOps and GitHub actions. And at last we will cover some advanced topics to add that extra bit of tidbits which makes you stand out when writing infrastructure as code such as some best practices and patterns when deploying multiple environments.</p>\n<p>So keep an eye out and support me and my book if you can 😍🙏🏽.</p>","timeToRead":5,"frontmatter":{"title":"My first ever book on Azure Bicep","unformattedDate":"2021-12-02T00:00:00.000Z","date":"Dec 02, 2021","path":"/bicep-book/","author":"Yaser Adel Mehraban","tags":["azure","bicep","devops","infrastructureascode"],"thumbnail":null}}},{"node":{"id":"6d57c7aa-5f97-5164-a4fa-2ccacf70cdde","html":"<p>If you have deployed a resource in <a href=\"https://azure.microsoft.com/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Microsoft Azure</a> as part of your CI/CD pipeline you have probably worked with <a href=\"https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/overview\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">ARM templates</a>. These templates can be used to automate your resource deployment to Azure and help you to have consistent environments whether it’s for testing, development or production purposes. However, there are some shortcomings when it comes to complex environments especially when you have many resources and the dependency between them makes the templates to be either super busy, very complex, or unreadable.</p>\n<p>For that Microsoft has introduced <a href=\"https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/bicep-overview\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Bicep</a> which is designed to overcome these issues and help you with your infrastructure as code setup.</p>\n<!--more-->\n<h2 id=\"whats-not-working-with-arm-templates\" style=\"position:relative;\"><a href=\"#whats-not-working-with-arm-templates\" aria-label=\"whats not working with arm templates permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>What’s not working with ARM templates?</h2>\n<p>Although there are some great features which make working with ARM templates a good experience such as functions, variables, nested templates etc, there is some room for improvements regarding below which has been raised by the community:</p>\n<ul>\n<li><strong>No comments</strong>: As of now you can’t use comments in the JSON files used by <a href=\"https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/overview\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Azure Resource Manager</a>. Since the users of ARM templates are mainly developers, comments would potentially help the next user to better understand the template and what’s going on in it. I’d personally argue with the fact that if you need comments in a template it probably means you need to refactor it, however, this is something which could come handy at times.</li>\n<li><strong>Parameter duplication</strong>: Since ARM templates are reusable, you would normally use parameters for customising the resource naming, number of resources to be deployed, pricing tier and so on. The problem is that these parameters would be needed and if you haven’t provided a default value you would get an error. So you might end up with lots of parameters repeated in different files for different environments, or simply replicating a single file and have lot’s of extra parameters which are not needed.</li>\n<li><strong>Validation</strong>: Although there is a validate command you can use to validate your templates, there might be times where validation doesn’t show you enough information or is not enough to prevent a failure in the actual run.</li>\n</ul>\n<h2 id=\"what-is-bicep\" style=\"position:relative;\"><a href=\"#what-is-bicep\" aria-label=\"what is bicep permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>What is Bicep?</h2>\n<p>Bicep is a DSL (domain specific language) which can be used to write your Infrastructure as Code (IaC). Instead of writing ARM templates you write your code with Bicep and it will transpile it to ARM for you. It simplifies the authoring experience and addresses some of the issues we mentioned earlier. Compared to using JSON, Bicep can help you simplify the template definition a great deal.</p>\n<p>Let’s see this using a simple example. Imagine you are trying to create a storage account in Azure, with ARM template this is the minimum you will need:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"51122175504479265000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`{\r\n  &quot;\\$schema&quot;: &quot;https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#&quot;,\r\n  &quot;contentVersion&quot;: &quot;1.0.0.0&quot;,\r\n  &quot;parameters&quot;: {\r\n    &quot;storageAccountType&quot;: {\r\n      &quot;type&quot;: &quot;secureString&quot;\r\n    }\r\n  },\r\n  &quot;variables&quot;: {\r\n    &quot;diagStorageAccountName&quot;: &quot;[concat('diags', uniqueString(resourceGroup().id))]&quot;\r\n  },\r\n  &quot;resources&quot;: [\r\n    {\r\n      &quot;type&quot;: &quot;Microsoft.Storage/storageAccounts&quot;,\r\n      &quot;apiVersion&quot;: &quot;2019-06-01&quot;,\r\n      &quot;name&quot;: &quot;[variables('diagStorageAccountName')]&quot;,\r\n      &quot;location&quot;: &quot;[resourceGroup().location]&quot;,\r\n      &quot;sku&quot;: {\r\n        &quot;name&quot;: &quot;[parameters('storageAccountType')]&quot;\r\n      },\r\n      &quot;kind&quot;: &quot;Storage&quot;\r\n    }\r\n  ]\r\n}`, `51122175504479265000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"json\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-json line-numbers\"><code class=\"language-json\"><span class=\"token punctuation\">{</span>\r\n  <span class=\"token property\">\"$schema\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#\"</span><span class=\"token punctuation\">,</span>\r\n  <span class=\"token property\">\"contentVersion\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"1.0.0.0\"</span><span class=\"token punctuation\">,</span>\r\n  <span class=\"token property\">\"parameters\"</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">{</span>\r\n    <span class=\"token property\">\"storageAccountType\"</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">{</span>\r\n      <span class=\"token property\">\"type\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"secureString\"</span>\r\n    <span class=\"token punctuation\">}</span>\r\n  <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\r\n  <span class=\"token property\">\"variables\"</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">{</span>\r\n    <span class=\"token property\">\"diagStorageAccountName\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"[concat('diags', uniqueString(resourceGroup().id))]\"</span>\r\n  <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\r\n  <span class=\"token property\">\"resources\"</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">[</span>\r\n    <span class=\"token punctuation\">{</span>\r\n      <span class=\"token property\">\"type\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"Microsoft.Storage/storageAccounts\"</span><span class=\"token punctuation\">,</span>\r\n      <span class=\"token property\">\"apiVersion\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"2019-06-01\"</span><span class=\"token punctuation\">,</span>\r\n      <span class=\"token property\">\"name\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"[variables('diagStorageAccountName')]\"</span><span class=\"token punctuation\">,</span>\r\n      <span class=\"token property\">\"location\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"[resourceGroup().location]\"</span><span class=\"token punctuation\">,</span>\r\n      <span class=\"token property\">\"sku\"</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">{</span>\r\n        <span class=\"token property\">\"name\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"[parameters('storageAccountType')]\"</span>\r\n      <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\r\n      <span class=\"token property\">\"kind\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"Storage\"</span>\r\n    <span class=\"token punctuation\">}</span>\r\n  <span class=\"token punctuation\">]</span>\r\n<span class=\"token punctuation\">}</span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></pre></div>\n<p>Using Bicep it will be simplified to:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"99075319862035890000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`@secure()\r\nparam storageAccountType string\r\nparam location string = resourceGroup().location\r\nvar diagStorageAccountName = concat('diags', uniqueString(resourceGroup().id))\r\nresource diagsAccount 'Microsoft.Storage/storageAccounts@2019-06-01' = {\r\n  name: diagStorageAccountName\r\n  location: location\r\n  sku: {\r\n    name: storageAccountType\r\n  }\r\n  kind: 'Storage'\r\n}`, `99075319862035890000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"js\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-js line-numbers\"><code class=\"language-js\">@<span class=\"token function\">secure</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span>\r\nparam storageAccountType string\r\nparam location string <span class=\"token operator\">=</span> <span class=\"token function\">resourceGroup</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">.</span>location\r\n<span class=\"token keyword\">var</span> diagStorageAccountName <span class=\"token operator\">=</span> <span class=\"token function\">concat</span><span class=\"token punctuation\">(</span><span class=\"token string\">'diags'</span><span class=\"token punctuation\">,</span> <span class=\"token function\">uniqueString</span><span class=\"token punctuation\">(</span><span class=\"token function\">resourceGroup</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">.</span>id<span class=\"token punctuation\">)</span><span class=\"token punctuation\">)</span>\r\nresource diagsAccount <span class=\"token string\">'Microsoft.Storage/storageAccounts@2019-06-01'</span> <span class=\"token operator\">=</span> <span class=\"token punctuation\">{</span>\r\n  <span class=\"token literal-property property\">name</span><span class=\"token operator\">:</span> diagStorageAccountName\r\n  <span class=\"token literal-property property\">location</span><span class=\"token operator\">:</span> location\r\n  <span class=\"token literal-property property\">sku</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">{</span>\r\n    <span class=\"token literal-property property\">name</span><span class=\"token operator\">:</span> storageAccountType\r\n  <span class=\"token punctuation\">}</span>\r\n  <span class=\"token literal-property property\">kind</span><span class=\"token operator\">:</span> <span class=\"token string\">'Storage'</span>\r\n<span class=\"token punctuation\">}</span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></pre></div>\n<p>You can see how much time and space you could be saving if you were to use Bicep.</p>\n<h2 id=\"benefits\" style=\"position:relative;\"><a href=\"#benefits\" aria-label=\"benefits permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Benefits</h2>\n<p>When it comes to the benefits of using Bicep, there is a list published in our documentation:</p>\n<ul>\n<li>Support for all resource types and API versions.</li>\n<li>Better authoring experience using editors such as VS Code (you will get validation, type-safety, intellisense).</li>\n<li>Modularity can be achieved using <a href=\"https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/bicep-modules\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">modules</a>. You can have modules representing an entire environment or a set of shared resources and use them anywhere in a Bicep file.</li>\n<li>Integration with Azure services such as Azure Policy, Templates specs, and Blueprints.</li>\n<li>No need to store a state file or keep any state. You can even use the <a href=\"https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/template-deploy-what-if\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">what-if operation</a> to preview your changes before deploying them.</li>\n<li>Bicep is open source with a strong community supporting it.</li>\n</ul>\n<h2 id=\"syntax\" style=\"position:relative;\"><a href=\"#syntax\" aria-label=\"syntax permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Syntax</h2>\n<p>Every Bicep resource will have the below syntax:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"94373423554818620000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`resource <symbolic-name> '<resource-type>@<api-version>\\` = {  \r\n  //properties\r\n  name: 'bicepstorage2063'\r\n  location: 'northcentralus'  \r\n  properties: {\r\n    //...sub properties\r\n  }\r\n}`, `94373423554818620000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"js\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-js line-numbers\"><code class=\"language-js\">resource <span class=\"token operator\">&lt;</span>symbolic<span class=\"token operator\">-</span>name<span class=\"token operator\">></span> '<span class=\"token operator\">&lt;</span>resource<span class=\"token operator\">-</span>type<span class=\"token operator\">></span>@<span class=\"token operator\">&lt;</span>api<span class=\"token operator\">-</span>version<span class=\"token operator\">></span>` <span class=\"token operator\">=</span> <span class=\"token punctuation\">{</span>  \r\n  <span class=\"token comment\">//properties</span>\r\n  <span class=\"token literal-property property\">name</span><span class=\"token operator\">:</span> <span class=\"token string\">'bicepstorage2063'</span>\r\n  <span class=\"token literal-property property\">location</span><span class=\"token operator\">:</span> <span class=\"token string\">'northcentralus'</span>  \r\n  <span class=\"token literal-property property\">properties</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">{</span>\r\n    <span class=\"token comment\">//...sub properties</span>\r\n  <span class=\"token punctuation\">}</span>\r\n<span class=\"token punctuation\">}</span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></pre></div>\n<p>Where:</p>\n<ul>\n<li><code class=\"language-text\">resource</code>: is a reserved keyword.</li>\n<li><code class=\"language-text\">symbolic name</code>: is an identifier within the Bicep file which can be used to reference this resource elsewhere.</li>\n<li><code class=\"language-text\">resource-type</code>: is the type of the resource you’re defining, e.g. <code class=\"language-text\">Microsoft.Storage</code>.</li>\n<li><code class=\"language-text\">api-version</code>: each resource provider publishes its own API version which defines which version of the Azure Resource Manager REST API should be used to deploy this resource.</li>\n<li><code class=\"language-text\">properties</code>: these are the resource specific properties. For example every resource has a <code class=\"language-text\">name</code> and <code class=\"language-text\">location</code>. In addition some have sub properties which you can pass on.</li>\n</ul>\n<h2 id=\"parameters\" style=\"position:relative;\"><a href=\"#parameters\" aria-label=\"parameters permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Parameters</h2>\n<p>When we talk about infrastructure as a code and reusability of our templates, we definitely end up using parameters to customise our resources. Be its name, sku, username or password, we will need to change these per environment or application.</p>\n<p>In a Bicep file you can define the parameters that need to be passed to it when deploying resources. You can put validation on the parameter value, provide default value, and limit it to allowed values. The format of a parameter will be such as below:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"65567775623804895000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`param <parameter-name> <parameter-type> = <parameter-value>`, `65567775623804895000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"js\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-js line-numbers\"><code class=\"language-js\">param <span class=\"token operator\">&lt;</span>parameter<span class=\"token operator\">-</span>name<span class=\"token operator\">></span> <span class=\"token operator\">&lt;</span>parameter<span class=\"token operator\">-</span>type<span class=\"token operator\">></span> <span class=\"token operator\">=</span> <span class=\"token operator\">&lt;</span>parameter<span class=\"token operator\">-</span>value<span class=\"token operator\">></span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span></span></pre></div>\n<p>Where:</p>\n<ul>\n<li><code class=\"language-text\">param</code>: is a reserved keyword.</li>\n<li><code class=\"language-text\">parameter-name</code> is the name of the parameter.</li>\n<li><code class=\"language-text\">parameter-type</code>: is the type of the parameter such as <code class=\"language-text\">string</code>, <code class=\"language-text\">object</code>, etc.</li>\n<li><code class=\"language-text\">parameter-value</code>: is the value of the parameter you’re passing in.</li>\n</ul>\n<p>Let’s review two examples to get a better understanding of the structure.</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"80224521230630630000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`@minLength(3)\r\n@maxLength(24)\r\nparam storageName string`, `80224521230630630000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"js\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-js line-numbers\"><code class=\"language-js\">@<span class=\"token function\">minLength</span><span class=\"token punctuation\">(</span><span class=\"token number\">3</span><span class=\"token punctuation\">)</span>\r\n@<span class=\"token function\">maxLength</span><span class=\"token punctuation\">(</span><span class=\"token number\">24</span><span class=\"token punctuation\">)</span>\r\nparam storageName string</code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span></span></pre></div>\n<p>In this example you’re limiting the <code class=\"language-text\">storageName</code> parameter’s value length to be between 3 and 24 characters. Or:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"76994498801404840000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`@allowed([\r\n  'Standard_LRS'\r\n  'Standard_GRS'\r\n  'Standard_RAGRS'\r\n  'Standard_ZRS'\r\n  'Premium_LRS'\r\n  'Premium_ZRS'\r\n  'Standard_GZRS'\r\n  'Standard_RAGZRS'\r\n])\r\nparam storageRedundancy string = 'Standard_LRS'`, `76994498801404840000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"js\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-js line-numbers\"><code class=\"language-js\">@<span class=\"token function\">allowed</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">[</span>\r\n  <span class=\"token string\">'Standard_LRS'</span>\r\n  <span class=\"token string\">'Standard_GRS'</span>\r\n  <span class=\"token string\">'Standard_RAGRS'</span>\r\n  <span class=\"token string\">'Standard_ZRS'</span>\r\n  <span class=\"token string\">'Premium_LRS'</span>\r\n  <span class=\"token string\">'Premium_ZRS'</span>\r\n  <span class=\"token string\">'Standard_GZRS'</span>\r\n  <span class=\"token string\">'Standard_RAGZRS'</span>\r\n<span class=\"token punctuation\">]</span><span class=\"token punctuation\">)</span>\r\nparam storageRedundancy string <span class=\"token operator\">=</span> <span class=\"token string\">'Standard_LRS'</span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></pre></div>\n<p>In this example you’re specifying the allowed values for the <code class=\"language-text\">storageRedundancy</code> parameter and also provide the default value if nothing is provided during the deployment.</p>\n<p>With ARM templates you had to use a separate file to pass the parameters during the deployments usually with a name ending in <code class=\"language-text\">.parameters.json</code>. In Bicep you need to use the same JSON file to pass the parameters in:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"73392149230982600000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`{\r\n  &quot;\\$schema&quot;: &quot;https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#&quot;,\r\n  &quot;contentVersion&quot;: &quot;1.0.0.0&quot;,\r\n  &quot;parameters&quot;: {\r\n    &quot;storageName&quot;: {\r\n      &quot;value&quot;: &quot;myuniquestoragename&quot;\r\n    },\r\n    &quot;storageRedundancy&quot;: {\r\n      &quot;value&quot;: &quot;Standard_GZRS&quot;\r\n    }\r\n  }\r\n}`, `73392149230982600000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"json\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-json line-numbers\"><code class=\"language-json\"><span class=\"token punctuation\">{</span>\r\n  <span class=\"token property\">\"$schema\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#\"</span><span class=\"token punctuation\">,</span>\r\n  <span class=\"token property\">\"contentVersion\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"1.0.0.0\"</span><span class=\"token punctuation\">,</span>\r\n  <span class=\"token property\">\"parameters\"</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">{</span>\r\n    <span class=\"token property\">\"storageName\"</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">{</span>\r\n      <span class=\"token property\">\"value\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"myuniquestoragename\"</span>\r\n    <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\r\n    <span class=\"token property\">\"storageRedundancy\"</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">{</span>\r\n      <span class=\"token property\">\"value\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"Standard_GZRS\"</span>\r\n    <span class=\"token punctuation\">}</span>\r\n  <span class=\"token punctuation\">}</span>\r\n<span class=\"token punctuation\">}</span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></pre></div>\n<h2 id=\"variables\" style=\"position:relative;\"><a href=\"#variables\" aria-label=\"variables permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Variables</h2>\n<p>Similar to parameters, variables play an important part in our templates, especially when it comes to naming conventions. These can store complex expressions to keep our templates clean and their maintenance simple. In Bicep variables are defined using the <code class=\"language-text\">var</code> keyword:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"32733907420534923000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`var <variable-name> = <value>`, `32733907420534923000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"js\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-js line-numbers\"><code class=\"language-js\"><span class=\"token keyword\">var</span> <span class=\"token operator\">&lt;</span>variable<span class=\"token operator\">-</span>name<span class=\"token operator\">></span> <span class=\"token operator\">=</span> <span class=\"token operator\">&lt;</span>value<span class=\"token operator\">></span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span></span></pre></div>\n<p>Where <code class=\"language-text\">variable-name</code> is the name of your variable. For example in our previous Bicep file we could have used a variable for our storage name:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"35243185706841264000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`var storageAccName = 'sa\\${uniqueString(resourceGroup().id)}'\r\n\r\nresource stg 'Microsoft.Storage/storageAccounts@2019-06-01' = {\r\n  name: storageAccountName\r\n  //...\r\n}`, `35243185706841264000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"js\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-js line-numbers\"><code class=\"language-js\"><span class=\"token keyword\">var</span> storageAccName <span class=\"token operator\">=</span> <span class=\"token string\">'sa${uniqueString(resourceGroup().id)}'</span>\r\n\r\nresource stg <span class=\"token string\">'Microsoft.Storage/storageAccounts@2019-06-01'</span> <span class=\"token operator\">=</span> <span class=\"token punctuation\">{</span>\r\n  <span class=\"token literal-property property\">name</span><span class=\"token operator\">:</span> storageAccountName\r\n  <span class=\"token comment\">//...</span>\r\n<span class=\"token punctuation\">}</span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span><span></span><span></span><span></span></span></pre></div>\n<p>Since we need a unique name for our storage account the <code class=\"language-text\">uniqueString</code> function is used (Don’t worry about that for now). The point is that we can create variables and use them in our template with ease.</p>\n<p>There are multiple variable types you can use:</p>\n<ul>\n<li>String</li>\n<li>Boolean</li>\n<li>Numeric</li>\n<li>Object</li>\n<li>Array</li>\n</ul>\n<h2 id=\"expressions\" style=\"position:relative;\"><a href=\"#expressions\" aria-label=\"expressions permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Expressions</h2>\n<p>Expressions are used in our templates for variety of reasons, from getting the current location of the resource group to subscription id or the current datetime.</p>\n<h3 id=\"functions\" style=\"position:relative;\"><a href=\"#functions\" aria-label=\"functions permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>functions</h3>\n<p>The good thing is that <strong>ANY</strong> valid <a href=\"https://docs.microsoft.com/azure/azure-resource-manager/templates/template-functions\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">ARM template function</a> is also a valid Bicep function.</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"57282681544942360000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`param currentTime string = utcNow()\r\n\r\nvar location = resourceGroup().location\r\n\r\nvar makeCapital = toUpper('all lowercase')`, `57282681544942360000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"js\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-js line-numbers\"><code class=\"language-js\">param currentTime string <span class=\"token operator\">=</span> <span class=\"token function\">utcNow</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span>\r\n\r\n<span class=\"token keyword\">var</span> location <span class=\"token operator\">=</span> <span class=\"token function\">resourceGroup</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">.</span>location\r\n\r\n<span class=\"token keyword\">var</span> makeCapital <span class=\"token operator\">=</span> <span class=\"token function\">toUpper</span><span class=\"token punctuation\">(</span><span class=\"token string\">'all lowercase'</span><span class=\"token punctuation\">)</span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span><span></span><span></span></span></pre></div>\n<h3 id=\"ternary-operator\" style=\"position:relative;\"><a href=\"#ternary-operator\" aria-label=\"ternary operator permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Ternary operator</h3>\n<p>To use conditions in your deployments you would use the <code class=\"language-text\">if</code> function in ARM templates, however, that’s not supported in Bicep. Instead, you can leverage the <strong>ternary operator</strong>:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"97535684014410400000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`param globalRedundancy bool = true\r\n\r\nresource stg 'Microsoft.Storage/storageAccounts@2019-06-01' = {\r\n  name: storageAccountName\r\n  location: location\r\n  kind: 'Storage'\r\n  sku: {\r\n    name: globalRedundancy ? 'Standard_GRS' : 'Standard_LRS' // if true --> GRS, else --> LRS\r\n  }\r\n}`, `97535684014410400000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"js\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-js line-numbers\"><code class=\"language-js\">param globalRedundancy bool <span class=\"token operator\">=</span> <span class=\"token boolean\">true</span>\r\n\r\nresource stg <span class=\"token string\">'Microsoft.Storage/storageAccounts@2019-06-01'</span> <span class=\"token operator\">=</span> <span class=\"token punctuation\">{</span>\r\n  <span class=\"token literal-property property\">name</span><span class=\"token operator\">:</span> storageAccountName\r\n  <span class=\"token literal-property property\">location</span><span class=\"token operator\">:</span> location\r\n  <span class=\"token literal-property property\">kind</span><span class=\"token operator\">:</span> <span class=\"token string\">'Storage'</span>\r\n  <span class=\"token literal-property property\">sku</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">{</span>\r\n    <span class=\"token literal-property property\">name</span><span class=\"token operator\">:</span> globalRedundancy <span class=\"token operator\">?</span> <span class=\"token string\">'Standard_GRS'</span> <span class=\"token operator\">:</span> <span class=\"token string\">'Standard_LRS'</span> <span class=\"token comment\">// if true --> GRS, else --> LRS</span>\r\n  <span class=\"token punctuation\">}</span>\r\n<span class=\"token punctuation\">}</span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></pre></div>\n<h2 id=\"output\" style=\"position:relative;\"><a href=\"#output\" aria-label=\"output permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Output</h2>\n<p>ARM templates have an output section where you could send information out of your pipeline to be accessed within other deployments or subsequent tasks. In Bicep you have the same concept via the <code class=\"language-text\">output</code> keyword.</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"56283259159275950000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`resource stg 'Microsoft.Storage/storageAccounts@2019-06-01' = {\r\n  //...\r\n}\r\n\r\noutput storageId string = stg.id`, `56283259159275950000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"js\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-js line-numbers\"><code class=\"language-js\">resource stg <span class=\"token string\">'Microsoft.Storage/storageAccounts@2019-06-01'</span> <span class=\"token operator\">=</span> <span class=\"token punctuation\">{</span>\r\n  <span class=\"token comment\">//...</span>\r\n<span class=\"token punctuation\">}</span>\r\n\r\noutput storageId string <span class=\"token operator\">=</span> stg<span class=\"token punctuation\">.</span>id</code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span><span></span><span></span></span></pre></div>\n<p>This will return the storage id out to be used later.</p>\n<h2 id=\"loops\" style=\"position:relative;\"><a href=\"#loops\" aria-label=\"loops permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Loops</h2>\n<p>In ARM templates if you wanted to deploy a resource multiple times you could leverage the <code class=\"language-text\">copy</code> operator to add a resource <code class=\"language-text\">n</code> times based on the loop count. In Bicep you have the <code class=\"language-text\">for</code> operator at your disposal:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"60171901606237910000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`resource foo 'my.provider/type@2021-03-01' = [for <ITERATOR_NAME> in <ARRAY> = {...}]`, `60171901606237910000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"js\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-js line-numbers\"><code class=\"language-js\">resource foo <span class=\"token string\">'my.provider/type@2021-03-01'</span> <span class=\"token operator\">=</span> <span class=\"token punctuation\">[</span><span class=\"token keyword\">for</span> <span class=\"token operator\">&lt;</span><span class=\"token constant\">ITERATOR_NAME</span><span class=\"token operator\">></span> <span class=\"token keyword\">in</span> <span class=\"token operator\">&lt;</span><span class=\"token constant\">ARRAY</span><span class=\"token operator\">></span> <span class=\"token operator\">=</span> <span class=\"token punctuation\">{</span><span class=\"token operator\">...</span><span class=\"token punctuation\">}</span><span class=\"token punctuation\">]</span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span></span></pre></div>\n<p>Where <code class=\"language-text\">ITERATOR_NAME</code> is a new symbol that’s only available inside your resource declaration.</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"26145640432015438000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`param containerNames array = [\r\n  'images'\r\n  'videos'\r\n  'pdf'\r\n]\r\n\r\nresource blob 'Microsoft.Storage/storageAccounts/blobServices/containers@2019-06-01' = [for name in containerNames: {\r\n  name: '\\${stg.name}/default/\\${name}'\r\n  //...\r\n}]`, `26145640432015438000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"js\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-js line-numbers\"><code class=\"language-js\">param containerNames array <span class=\"token operator\">=</span> <span class=\"token punctuation\">[</span>\r\n  <span class=\"token string\">'images'</span>\r\n  <span class=\"token string\">'videos'</span>\r\n  <span class=\"token string\">'pdf'</span>\r\n<span class=\"token punctuation\">]</span>\r\n\r\nresource blob <span class=\"token string\">'Microsoft.Storage/storageAccounts/blobServices/containers@2019-06-01'</span> <span class=\"token operator\">=</span> <span class=\"token punctuation\">[</span><span class=\"token keyword\">for</span> name <span class=\"token keyword\">in</span> <span class=\"token literal-property property\">containerNames</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">{</span>\r\n  <span class=\"token literal-property property\">name</span><span class=\"token operator\">:</span> <span class=\"token string\">'${stg.name}/default/${name}'</span>\r\n  <span class=\"token comment\">//...</span>\r\n<span class=\"token punctuation\">}</span><span class=\"token punctuation\">]</span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></pre></div>\n<p>This snippet creates three containers within the storage account in a loop.</p>\n<h2 id=\"existing-keyword\" style=\"position:relative;\"><a href=\"#existing-keyword\" aria-label=\"existing keyword permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Existing keyword</h2>\n<p>If you want to deploy a resource which is depending on an existing resource you can leverage the <code class=\"language-text\">existing</code> keyword.</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"63762265251693770000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`resource stg 'Microsoft.Storage/storageAccounts@2019-06-01' existing = {\r\n  name: storageAccountName\r\n}`, `63762265251693770000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"js\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-js line-numbers\"><code class=\"language-js\">resource stg <span class=\"token string\">'Microsoft.Storage/storageAccounts@2019-06-01'</span> existing <span class=\"token operator\">=</span> <span class=\"token punctuation\">{</span>\r\n  <span class=\"token literal-property property\">name</span><span class=\"token operator\">:</span> storageAccountName\r\n<span class=\"token punctuation\">}</span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span></span></pre></div>\n<p>You won’t need the other properties since the resource already exists. You need enough information to be able to identify the resource. Now that you have this reference, you can use it in other parts of your deployment.</p>\n<h2 id=\"modules\" style=\"position:relative;\"><a href=\"#modules\" aria-label=\"modules permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Modules</h2>\n<p>In ARM templates you had the concept of linked templates when it came to reuse a template in other deployments. In Bicep you have <code class=\"language-text\">modules</code>. You can define a resource in a module and reuse that module in other Bicep files.</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"82730975100833430000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`.\r\n├── main.bicep\r\n└── stg.bicep`, `82730975100833430000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-bash line-numbers\"><code class=\"language-bash\"><span class=\"token builtin class-name\">.</span>\r\n├── main.bicep\r\n└── stg.bicep</code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span></span></pre></div>\n<p>In our <code class=\"language-text\">stg</code> file you will define the resource, its parameters, variables, outputs, etc:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"55819060569321955000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`//stg.bicep\r\nparam storageAccountName\r\nvar storageSku = 'Standard_LRS'\r\n\r\nresource stg 'Microsoft.Storage/storageAccounts@2019-06-01' = {\r\n  name: storageAccountName\r\n  location: resourceGroup().location\r\n  kind: 'Storage'\r\n  sku: {\r\n    name: storageSku\r\n  }\r\n}`, `55819060569321955000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"js\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-js line-numbers\"><code class=\"language-js\"><span class=\"token comment\">//stg.bicep</span>\r\nparam storageAccountName\r\n<span class=\"token keyword\">var</span> storageSku <span class=\"token operator\">=</span> <span class=\"token string\">'Standard_LRS'</span>\r\n\r\nresource stg <span class=\"token string\">'Microsoft.Storage/storageAccounts@2019-06-01'</span> <span class=\"token operator\">=</span> <span class=\"token punctuation\">{</span>\r\n  <span class=\"token literal-property property\">name</span><span class=\"token operator\">:</span> storageAccountName\r\n  <span class=\"token literal-property property\">location</span><span class=\"token operator\">:</span> <span class=\"token function\">resourceGroup</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">.</span>location\r\n  <span class=\"token literal-property property\">kind</span><span class=\"token operator\">:</span> <span class=\"token string\">'Storage'</span>\r\n  <span class=\"token literal-property property\">sku</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">{</span>\r\n    <span class=\"token literal-property property\">name</span><span class=\"token operator\">:</span> storageSku\r\n  <span class=\"token punctuation\">}</span>\r\n<span class=\"token punctuation\">}</span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></pre></div>\n<p>And in the <code class=\"language-text\">main</code> file you will reuse the storage account as a module using the <code class=\"language-text\">module</code> keyword:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"79053227976253960000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`//main.bicep\r\nmodule stg './storage.bicep' = {\r\n  name: 'storageDeploy'\r\n  params: {\r\n    storageAccountName: '<YOURUNIQUESTORAGENAME>'\r\n  }\r\n}\r\n\r\noutput storageName array = stg.outputs.containerProps`, `79053227976253960000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"js\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-js line-numbers\"><code class=\"language-js\"><span class=\"token comment\">//main.bicep</span>\r\nmodule stg <span class=\"token string\">'./storage.bicep'</span> <span class=\"token operator\">=</span> <span class=\"token punctuation\">{</span>\r\n  <span class=\"token literal-property property\">name</span><span class=\"token operator\">:</span> <span class=\"token string\">'storageDeploy'</span>\r\n  <span class=\"token literal-property property\">params</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">{</span>\r\n    <span class=\"token literal-property property\">storageAccountName</span><span class=\"token operator\">:</span> <span class=\"token string\">'&lt;YOURUNIQUESTORAGENAME>'</span>\r\n  <span class=\"token punctuation\">}</span>\r\n<span class=\"token punctuation\">}</span>\r\n\r\noutput storageName array <span class=\"token operator\">=</span> stg<span class=\"token punctuation\">.</span>outputs<span class=\"token punctuation\">.</span>containerProps</code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></pre></div>\n<p>You only need to pass the required properties which in case of our storage account is the name.</p>\n<h2 id=\"the-code-classlanguage-textanycode-keyword\" style=\"position:relative;\"><a href=\"#the-code-classlanguage-textanycode-keyword\" aria-label=\"the code classlanguage textanycode keyword permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>The <code class=\"language-text\">any</code> keyword</h2>\n<p>There might be some cases where Bicep throws a false positive when it comes to errors or warnings. This might happen based on different situations such as the API not having the correct type definition. You can use the <code class=\"language-text\">any</code> keyword to get around these situations when defining resources which have incorrect types assigned. One of examples is the container instances CPU and Memory properties which expect an <code class=\"language-text\">int</code>, but in fact they are <code class=\"language-text\">number</code> since you can pass non-integer values such as <code class=\"language-text\">0.5</code>.</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"26383233399133800000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`resource wpAci 'microsoft.containerInstance/containerGroups@2019-12-01' = {\r\n  name: 'wordpress-containerinstance'\r\n  location: location\r\n  properties: {\r\n    containers: [\r\n      {\r\n        name: 'wordpress'\r\n        properties: {\r\n          ...\r\n          resources: {\r\n            requests: {\r\n              cpu: any('0.5')\r\n              memoryInGB: any('0.7')\r\n            }\r\n          }\r\n        }\r\n      }\r\n    ]\r\n  }\r\n}`, `26383233399133800000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"js\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-js line-numbers\"><code class=\"language-js\">resource wpAci <span class=\"token string\">'microsoft.containerInstance/containerGroups@2019-12-01'</span> <span class=\"token operator\">=</span> <span class=\"token punctuation\">{</span>\r\n  <span class=\"token literal-property property\">name</span><span class=\"token operator\">:</span> <span class=\"token string\">'wordpress-containerinstance'</span>\r\n  <span class=\"token literal-property property\">location</span><span class=\"token operator\">:</span> location\r\n  <span class=\"token literal-property property\">properties</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">{</span>\r\n    <span class=\"token literal-property property\">containers</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">[</span>\r\n      <span class=\"token punctuation\">{</span>\r\n        <span class=\"token literal-property property\">name</span><span class=\"token operator\">:</span> <span class=\"token string\">'wordpress'</span>\r\n        <span class=\"token literal-property property\">properties</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">{</span>\r\n          <span class=\"token operator\">...</span>\r\n          <span class=\"token literal-property property\">resources</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">{</span>\r\n            <span class=\"token literal-property property\">requests</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">{</span>\r\n              <span class=\"token literal-property property\">cpu</span><span class=\"token operator\">:</span> <span class=\"token function\">any</span><span class=\"token punctuation\">(</span><span class=\"token string\">'0.5'</span><span class=\"token punctuation\">)</span>\r\n              <span class=\"token literal-property property\">memoryInGB</span><span class=\"token operator\">:</span> <span class=\"token function\">any</span><span class=\"token punctuation\">(</span><span class=\"token string\">'0.7'</span><span class=\"token punctuation\">)</span>\r\n            <span class=\"token punctuation\">}</span>\r\n          <span class=\"token punctuation\">}</span>\r\n        <span class=\"token punctuation\">}</span>\r\n      <span class=\"token punctuation\">}</span>\r\n    <span class=\"token punctuation\">]</span>\r\n  <span class=\"token punctuation\">}</span>\r\n<span class=\"token punctuation\">}</span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></pre></div>\n<p>By using <code class=\"language-text\">any</code> and passing the value you can get around the possible errors which might be raised during the build or the validation stage.</p>\n<h2 id=\"tooling\" style=\"position:relative;\"><a href=\"#tooling\" aria-label=\"tooling permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Tooling</h2>\n<p>In terms of tooling the support is the same if not better than the ARM templates.</p>\n<h3 id=\"vs-code-extension\" style=\"position:relative;\"><a href=\"#vs-code-extension\" aria-label=\"vs code extension permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>VS Code extension</h3>\n<p>VS Code comes with <a href=\"https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-bicep\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">an official extension for Bicep</a>. This extension gives you validation, intellisense, dot property access, snippets etc.</p>\n<h3 id=\"cicd\" style=\"position:relative;\"><a href=\"#cicd\" aria-label=\"cicd permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>CI/CD</h3>\n<p>If you’re using <a href=\"https://github.com/features/actions\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">GitHub Actions</a> for your CI/CD pipeline, there is already a <a href=\"https://github.com/marketplace/actions/bicep-build\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Bicep action</a> created by our developer advocate <a href=\"https://github.com/justinyoo\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Justin Yoo</a> which you can use to build you bicep file and deploy it to Azure.</p>\n<h3 id=\"cli\" style=\"position:relative;\"><a href=\"#cli\" aria-label=\"cli permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>CLI</h3>\n<p>Bicep comes with a CLI that you can install locally on <a href=\"https://github.com/Azure/bicep/blob/main/docs/installing.md\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Windows, MacOS, and Linux</a>. That gives you the ability to build and deploy your Bicep files with <a href=\"https://docs.microsoft.com/en-us/cli/azure\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Azure CLI</a>.</p>\n<h2 id=\"summery\" style=\"position:relative;\"><a href=\"#summery\" aria-label=\"summery permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Summery</h2>\n<p>In short, I highly recommend using Bicep and improving your IaC and deployments. Of course if your ARM templates are too many, or very complex you might benefit from converting them more, but if you already have a streamlined pipeline with maintainable templates, you could keep them and create any new template using Bicep instead.</p>","timeToRead":8,"frontmatter":{"title":"From ARM to Bicep 💪🏽","unformattedDate":"2021-05-10T00:00:00.000Z","date":"May 10, 2021","path":"/from-arm-to-bicep/","author":"Yaser Adel Mehraban","tags":["showdev","azure","arm","bicep"],"thumbnail":null}}}]}},"pageContext":{"tag":"bicep"}},"staticQueryHashes":[],"slicesMap":{}}