Showing posts from July, 2020

Terraform Functions - Part 4 - Advanced count and conditional expressions

In the final part of this blog series we will bring together the  Terraform  count and conditional expression functions in a more complex deployment to expand on what we learnt in part 2 and part 3 .  We will deploy a Virtual Machine, using the conditional expression function to determine whether we should or shouldn't deploy a Public IP (PIP).  We use the count function to deploy multiple VMs, in part 2 of the blog series we used count to deploy a WebApp which was quite straightforward.  When deploying a VM we have related resources including NIC, PIPs and disks and we have to ensure we deploy the correct number of these and attach them to each VM resource. In part 1 we cover an overview of the blog series and some pre-requisites you will need to get started when working through the deployment steps in this blog series, if you haven't seen this information please review this  here  before you get started with the steps below.  This include the code you will need to follow a