Posts

Terraform Functions - Part 3 - Conditional expression

In part three of this blog series we will take a look at the conditional expression function in  Terraform  and see how we can use this with a basic  Azure Web App  deployment. In a future blog we will explore how to use the conditional expression alongside the count function in a more complex resource deployment.  In part one 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. Conditional expressions can be used to dynamically omit or change an argument depending on a certain condition. This can be useful for several scenarios, one example may be that you create a module for deploying VMs and have a variable for VM size of small or large, you can set this as a variable and evaluate this variable to change configurations like SKU, disk size et...

Terraform Functions - Part 2 - Count

In part two of this blog series we will take a look at the count function in Terraform and see how we can use this with a basic Azure Web App deployment. In a future blog we will explore how to use the count function in a more complex resource deployment.  In part one 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. The count function is very useful for easily deploying multiple resources of the same type and configuration. For example, we may need a web farm and all the Virtual Machines need the same configuration, using the count function we can deploy the same resource multiple times and include the count number in the name so we deploy web1, web2, web3. We can also use the count function when deploying the related resources NICs, IP addresses, disks etc. We c...

Terraform Functions - Part 1 - For_Each

In this blog series we will explore some of the common Terraform functions that will be useful to know when deploying resources to Azure. With working demos you can follow along and deploy resources to your own Azure subscriptions and learn how these functions behave.  Knowing about these features and combining the use of them in your Terraform configurations will help as you make more advanced deployment templates and modules. This will be a four part series covering the following; Basic for_each demo Basic count demo Conditional expression demo Advanced count and conditional expression combined The assumption is you have an Azure subscription you can use to deploy these resource to. You have  installed terraform  version 0.12 minimum and are familiar with deploying basic resources to Azure using Terraform configurations. You will have the az cli installed and know how to authenticate to Azure using azure cli. We will be working with a local Terraform state file t...

Cost Optimisation in Azure

Image
As we go through the current situation with coronavirus many companies will need to review their spending.  I have gathered some key resources and tips to start making real differences to your Azure costs today! This is by no means an exhaustive list and I will add to this as I remember stuff over the coming days but I wanted to share this now so you can start to help your business save money as soon as possible. Monitoring This may seem an odd way to start a cost saving exercise but the key to knowing what actions to take is having information available to you so you can make informed decisions.  These metrics can give you great insights into your environments and applications and help you identify underutilised resources. All resources come with some key metrics available to you out of the box without enabling or setting up other resources. Simply browse to the resource in the portal and you will see the metrics on the overview page or can go into the metrics sect...