[{"data":1,"prerenderedAt":266},["ShallowReactive",2],{"i-ph:list-bold":3,"i-ph:github-logo-bold":8,"i-ph:linkedin-logo-bold":10,"i-ph:rss-bold":12,"blog-\u002Fblog\u002F2023-01-13-different-languages-iac":14,"blog-all-meta":234,"i-ph:clock-bold":254,"i-ph:x-logo-bold":256,"i-ph:link-bold":258,"i-ph:arrow-left-bold":260,"i-ph:arrow-right-bold":262,"i-ph:copy-bold":264},{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":7},0,256,false,"\u003Cpath fill=\"currentColor\" d=\"M228 128a12 12 0 0 1-12 12H40a12 12 0 0 1 0-24h176a12 12 0 0 1 12 12M40 76h176a12 12 0 0 0 0-24H40a12 12 0 0 0 0 24m176 104H40a12 12 0 0 0 0 24h176a12 12 0 0 0 0-24\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":9},"\u003Cpath fill=\"currentColor\" d=\"M212.62 75.17A63.7 63.7 0 0 0 206.39 26A12 12 0 0 0 196 20a63.71 63.71 0 0 0-50 24h-20a63.71 63.71 0 0 0-50-24a12 12 0 0 0-10.39 6a63.7 63.7 0 0 0-6.23 49.17A61.5 61.5 0 0 0 52 104v8a60.1 60.1 0 0 0 45.76 58.28A43.66 43.66 0 0 0 92 192v4H76a20 20 0 0 1-20-20a44.05 44.05 0 0 0-44-44a12 12 0 0 0 0 24a20 20 0 0 1 20 20a44.05 44.05 0 0 0 44 44h16v12a12 12 0 0 0 24 0v-40a20 20 0 0 1 40 0v40a12 12 0 0 0 24 0v-40a43.66 43.66 0 0 0-5.76-21.72A60.1 60.1 0 0 0 220 112v-8a61.5 61.5 0 0 0-7.38-28.83M196 112a36 36 0 0 1-36 36h-48a36 36 0 0 1-36-36v-8a37.87 37.87 0 0 1 6.13-20.12a11.65 11.65 0 0 0 1.58-11.49a39.9 39.9 0 0 1-.4-27.72a39.87 39.87 0 0 1 26.41 17.8a12 12 0 0 0 10.1 5.53h32.35a12 12 0 0 0 10.11-5.53a39.84 39.84 0 0 1 26.41-17.8a39.9 39.9 0 0 1-.4 27.72a12 12 0 0 0 1.61 11.53A37.85 37.85 0 0 1 196 104Z\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":11},"\u003Cpath fill=\"currentColor\" d=\"M216 20H40a20 20 0 0 0-20 20v176a20 20 0 0 0 20 20h176a20 20 0 0 0 20-20V40a20 20 0 0 0-20-20m-4 192H44V44h168Zm-100-36v-56a12 12 0 0 1 21.43-7.41A40 40 0 0 1 192 148v28a12 12 0 0 1-24 0v-28a16 16 0 0 0-32 0v28a12 12 0 0 1-24 0m-16-56v56a12 12 0 0 1-24 0v-56a12 12 0 0 1 24 0M68 80a16 16 0 1 1 16 16a16 16 0 0 1-16-16\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":13},"\u003Cpath fill=\"currentColor\" d=\"M109.74 146.26A75.53 75.53 0 0 1 132 200a12 12 0 0 1-24 0a52 52 0 0 0-52-52a12 12 0 0 1 0-24a75.5 75.5 0 0 1 53.74 22.26M56 76a12 12 0 0 0 0 24a100 100 0 0 1 100 100a12 12 0 0 0 24 0A124 124 0 0 0 56 76m121.62 2.38A170.85 170.85 0 0 0 56 28a12 12 0 0 0 0 24a147 147 0 0 1 104.65 43.35A147 147 0 0 1 204 200a12 12 0 0 0 24 0a170.85 170.85 0 0 0-50.38-121.62M60 180a16 16 0 1 0 16 16a16 16 0 0 0-16-16\"\u002F>",{"_path":15,"_dir":16,"_draft":17,"_partial":6,"_locale":18,"title":19,"description":20,"date":21,"preview":18,"draft":17,"tags":22,"categories":18,"image":27,"body":28,"_type":228,"_id":229,"_source":230,"_file":231,"_stem":232,"_extension":233},"\u002Fblog\u002F2023-01-13-different-languages-iac","blog","false","","Different languages for infrastructure-as-code","An overview of the main languages and tools used for infrastructure-as-code: Terraform, Bicep, ARM, Pulumi and CloudFormation.","2023-01-13T11:13:49.196Z",[23,24,25,26],"iac","terraform","bicep","arm","\u002Fimages\u002Fiac-overview.png",{"type":29,"children":30,"toc":222},"root",[31,39,45,52,57,62,67,74,80,85,115,120,127,132,137,147,151,156,161,169,173,178,183,191,196,202,207,212,217],{"type":32,"tag":33,"props":34,"children":36},"element","h1",{"id":35},"different-languages-for-infrastructure-as-code",[37],{"type":38,"value":19},"text",{"type":32,"tag":40,"props":41,"children":42},"p",{},[43],{"type":38,"value":44},"Infrastructure-as-Code (IaC) is a concept that allows for the management of infrastructure through the use of code. This means that instead of manually configuring and setting up infrastructure using a web interface, the infrastructure is defined and provisioned using code. This allows for greater automation, consistency, and repeatability in the management of infrastructure, as well as making it easier to version control, test and rollback changes",{"type":32,"tag":46,"props":47,"children":49},"h3",{"id":48},"benefits-of-infrastructure-as-code",[50],{"type":38,"value":51},"Benefits of Infrastructure-as-code",{"type":32,"tag":40,"props":53,"children":54},{},[55],{"type":38,"value":56},"Imagine you need to deploy multiple virtual machines, three storage accounts, and a virtual network. Next, you need to configure the network links on that network and format tje diskss. \"Just one click\" in the UI turns into hours of clicking and filling out all the forms and properties.",{"type":32,"tag":40,"props":58,"children":59},{},[60],{"type":38,"value":61},"Now imagine that something went wrong towards the end and you have to start all over again. With the IaC model, you can write code to describe all infrastructure components and then leave the implementation to Terraform, Bicep, or ARM. In this case, if something goes wrong at the end, you can change a few lines of code to fix the problem and run the code again.",{"type":32,"tag":40,"props":63,"children":64},{},[65],{"type":38,"value":66},"Another benefit is the ability to use a source code versioning system such as Azure DevOps or Github to store your code. This gives you equal version control and makes it possible to easily see all changes in the infrastructure and make them available to all team members. By using versions, you automatically  have an audit log in which all changes are recorded",{"type":32,"tag":40,"props":68,"children":69},{},[70],{"type":32,"tag":71,"props":72,"children":73},"img",{"alt":18,"src":27},[],{"type":32,"tag":46,"props":75,"children":77},{"id":76},"which-language-should-you-use",[78],{"type":38,"value":79},"Which language should you use?",{"type":32,"tag":40,"props":81,"children":82},{},[83],{"type":38,"value":84},"When you start using IaC, you still have to make a number of choices. The most important choice here is: which language will you use? In principle, you have a choice of three languages.",{"type":32,"tag":86,"props":87,"children":88},"ul",{},[89,99,107],{"type":32,"tag":90,"props":91,"children":92},"li",{},[93],{"type":32,"tag":94,"props":95,"children":96},"span",{},[97],{"type":38,"value":98},"ARM templates (json)",{"type":32,"tag":90,"props":100,"children":101},{},[102],{"type":32,"tag":94,"props":103,"children":104},{},[105],{"type":38,"value":106},"Bicep",{"type":32,"tag":90,"props":108,"children":109},{},[110],{"type":32,"tag":94,"props":111,"children":112},{},[113],{"type":38,"value":114},"Terraform",{"type":32,"tag":40,"props":116,"children":117},{},[118],{"type":38,"value":119},"The three languages all use the Azure Resource Manager for the deployment. The Azure Resource Manager ensures that the code is converted to a resource that must be created. For each language I've made an example how to create a resource group within Azure, so that you can see a good difference between the different languages.",{"type":32,"tag":121,"props":122,"children":124},"h4",{"id":123},"arm-template-json",[125],{"type":38,"value":126},"ARM template (json)",{"type":32,"tag":40,"props":128,"children":129},{},[130],{"type":38,"value":131},"In the past, ARM templates were the only way to create resources in Azure based on IaC. This is also the default \"language\" that the Azure Resource Manager uses.",{"type":32,"tag":40,"props":133,"children":134},{},[135],{"type":38,"value":136},"The following code is required to create a resource group:",{"type":32,"tag":138,"props":139,"children":141},"pre",{"code":140},"{\n  \"$schema\": \"https:\u002F\u002Fschema.management.azure.com\u002Fschemas\u002F2018-05-01\u002FsubscriptionDeploymentTemplate.json#\",\n  \"contentVersion\": \"1.0.0.0\",\n  \"parameters\": {\n    \"rgName\": {\n      \"type\": \"string\"\n    },\n    \"rgLocation\": {\n      \"type\": \"string\"\n    }\n  },\n  \"variables\": {},\n  \"resources\": [\n    {\n      \"type\": \"Microsoft.Resources\u002FresourceGroups\",\n      \"apiVersion\": \"2021-04-01\",\n      \"name\": \"[parameters('rgName')]\",\n      \"location\": \"[parameters('rgLocation')]\",\n      \"properties\": {}\n    }\n  ],\n  \"outputs\": {}\n}\n",[142],{"type":32,"tag":143,"props":144,"children":145},"code",{"__ignoreMap":18},[146],{"type":38,"value":140},{"type":32,"tag":121,"props":148,"children":149},{"id":25},[150],{"type":38,"value":106},{"type":32,"tag":40,"props":152,"children":153},{},[154],{"type":38,"value":155},"Bicep is a language developed by Microsoft as a replacement for the ARM templates. The advantage of this language is that it is more readable and you need fewer lines to achieve the same. The disadvantage of Bicep, just like ARM templates, is that it can only be used on the Azure platform.",{"type":32,"tag":40,"props":157,"children":158},{},[159],{"type":38,"value":160},"As indicated, you need less code for the same action, creating a resource group.",{"type":32,"tag":138,"props":162,"children":164},{"code":163},"targetScope = 'subscription'\n\nresource rg 'Microsoft.Resources\u002FresourceGroups@2021-01-01' = {\n  name: 'rg-contoso'\n  location: 'westeurope'\n}\n",[165],{"type":32,"tag":143,"props":166,"children":167},{"__ignoreMap":18},[168],{"type":38,"value":163},{"type":32,"tag":121,"props":170,"children":171},{"id":24},[172],{"type":38,"value":114},{"type":32,"tag":40,"props":174,"children":175},{},[176],{"type":38,"value":177},"Terraform is a language developed by the Terracorp company. This language can be used for all cloud platforms, Google, AWS and Azure. This makes it a language that is widely used by developers in the open-source community and companies with a multi-cloud environment.",{"type":32,"tag":40,"props":179,"children":180},{},[181],{"type":38,"value":182},"Like Bicep, Terraform uses the Azure Resource Manager to create the resources. Because Terraform can be used for multiple cloud environments, you must indicate that you want to use the Azure Resource Manager. To create a resource group you can use the following code:",{"type":32,"tag":138,"props":184,"children":186},{"code":185},"resource \"azurerm_resource_group\" \"example\" {\n  name     = \"rg-contoso\"\n  location = \"West Europe\"\n}\n",[187],{"type":32,"tag":143,"props":188,"children":189},{"__ignoreMap":18},[190],{"type":38,"value":185},{"type":32,"tag":40,"props":192,"children":193},{},[194],{"type":38,"value":195},"The emergence of Bicep and Terraform makes it easier to create resources in an unambiguous way. Because both languages are easy to read, you also have documentation of the environment and, in combination with Azure DevOps or Github, an audit trail for the changes.",{"type":32,"tag":121,"props":197,"children":199},{"id":198},"which-language-is-best-for-you-to-use",[200],{"type":38,"value":201},"Which language is best for you to use?",{"type":32,"tag":40,"props":203,"children":204},{},[205],{"type":38,"value":206},"There is not really one answer to this and it has a lot to do with which cloud provider you use and the composition of a team.",{"type":32,"tag":40,"props":208,"children":209},{},[210],{"type":38,"value":211},"If you only use Microsoft Azure, it's best to work with Bicep because this language has been developed for Microsoft Azure.",{"type":32,"tag":40,"props":213,"children":214},{},[215],{"type":38,"value":216},"If you use different Cloud environments within your company, for example AWS and Azure, it is advisable to use Terraform because you can then manage both environments with the same language.",{"type":32,"tag":40,"props":218,"children":219},{},[220],{"type":38,"value":221},"In my next blog I will discuss the use of Terraform in more detail.",{"title":18,"searchDepth":223,"depth":223,"links":224},2,[225,227],{"id":48,"depth":226,"text":51},3,{"id":76,"depth":226,"text":79},"markdown","content:blog:2023-01-13-different-languages-iac.md","content","blog\u002F2023-01-13-different-languages-iac.md","blog\u002F2023-01-13-different-languages-iac","md",[235,242,244],{"_path":236,"title":237,"description":238,"date":239,"tags":240,"image":241},"\u002Fblog\u002F2023-03-17-terraform-explained","Terraform Explained","A practical introduction to Terraform: what it is, how it works and why you would use it for managing cloud infrastructure.","2023-03-17T11:13:49.196Z",[23,24],"\u002Fimages\u002Fterraform.png",{"_path":15,"title":19,"description":20,"date":21,"tags":243,"image":27},[23,24,25,26],{"_path":245,"title":246,"description":247,"date":248,"tags":249,"image":253},"\u002Fblog\u002F2023-01-07-windows-365-cloud-wat-is-het-en-wat-heb-je-ervoor-nodig","Windows 365 Cloud: Wat is het en wat heb je ervoor nodig?","Microsoft heeft kort geleden aangekondigd dat ze met een nieuwe functionaliteit komen om het hybride werken nog meer te ondersteunen.","2022-07-26T10:01:27.048Z",[250,251,252],"windows-365","intune","azure","\u002Fimages\u002Fhead365.jpg",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":255},"\u003Cpath fill=\"currentColor\" d=\"M128 20a108 108 0 1 0 108 108A108.12 108.12 0 0 0 128 20m0 192a84 84 0 1 1 84-84a84.09 84.09 0 0 1-84 84m68-84a12 12 0 0 1-12 12h-56a12 12 0 0 1-12-12V72a12 12 0 0 1 24 0v44h44a12 12 0 0 1 12 12\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":257},"\u003Cpath fill=\"currentColor\" d=\"m218.12 209.56l-61-95.8l59.72-65.69a12 12 0 0 0-17.76-16.14l-55.27 60.84l-37.69-59.21A12 12 0 0 0 96 28H48a12 12 0 0 0-10.12 18.44l61 95.8l-59.76 65.69a12 12 0 1 0 17.76 16.14l55.31-60.84l37.69 59.21A12 12 0 0 0 160 228h48a12 12 0 0 0 10.12-18.44M166.59 204L69.86 52h19.55l96.73 152Z\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":259},"\u003Cpath fill=\"currentColor\" d=\"M117.18 188.74a12 12 0 0 1 0 17l-5.12 5.12A58.26 58.26 0 0 1 70.6 228a58.62 58.62 0 0 1-41.46-100.08l34.75-34.75a58.64 58.64 0 0 1 98.56 28.11a12 12 0 1 1-23.37 5.44a34.65 34.65 0 0 0-58.22-16.58l-34.75 34.75A34.62 34.62 0 0 0 70.57 204a34.4 34.4 0 0 0 24.49-10.14l5.11-5.12a12 12 0 0 1 17.01 0M226.83 45.17a58.65 58.65 0 0 0-82.93 0l-5.11 5.11a12 12 0 0 0 17 17l5.12-5.12a34.63 34.63 0 1 1 49 49l-34.81 34.7A34.4 34.4 0 0 1 150.61 156a34.63 34.63 0 0 1-33.69-26.72a12 12 0 0 0-23.38 5.44A58.64 58.64 0 0 0 150.56 180h.05a58.28 58.28 0 0 0 41.47-17.17l34.75-34.75a58.62 58.62 0 0 0 0-82.91\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":261},"\u003Cpath fill=\"currentColor\" d=\"M228 128a12 12 0 0 1-12 12H69l51.52 51.51a12 12 0 0 1-17 17l-72-72a12 12 0 0 1 0-17l72-72a12 12 0 0 1 17 17L69 116h147a12 12 0 0 1 12 12\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":263},"\u003Cpath fill=\"currentColor\" d=\"m224.49 136.49l-72 72a12 12 0 0 1-17-17L187 140H40a12 12 0 0 1 0-24h147l-51.49-51.52a12 12 0 0 1 17-17l72 72a12 12 0 0 1-.02 17.01\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":265},"\u003Cpath fill=\"currentColor\" d=\"M216 28H88a12 12 0 0 0-12 12v36H40a12 12 0 0 0-12 12v128a12 12 0 0 0 12 12h128a12 12 0 0 0 12-12v-36h36a12 12 0 0 0 12-12V40a12 12 0 0 0-12-12m-60 176H52V100h104Zm48-48h-24V88a12 12 0 0 0-12-12h-68V52h104Z\"\u002F>",1782483246207]