Some Terraform Azure Notes

I have just finished working on a few large Terraform Azure deployments, thought I would stick a few notes down in a blog post so that I can refer to them in the future as well as hopefully being useful to others. Azure Diagnostic Settings While the azurerm_monitor_diagnostic_setting resource can be used to apply diagnostic settings to pretty much any other resource, however, as each resource has different logs and metrics figuring them out can be a chore....

August 30, 2021 · 6 min · Russ McKendrick

Tracking costs in Terraform using Infracost

In my last blog post I introduced a stage which executed Checkov to my Terraform Azure DevOps pipeline, this scanned the Terraform configuration and stopped the deployment if there was an issue. I also added a stage which checks to see if there are any resources being destroyed. Whats missing? Both of these I thought should give some basic protection against problems caused by common configuration issues, which they did, but it didn’t take into account the end user, i....

August 24, 2021 · 14 min · Russ McKendrick

Azure DevOps Terraform Pipeline with Checkov & Approvals

It’s been just over a year since I first posted about the Azure DevOps Terraform Pipeline I used to use, I say used to use, because that pipeline is now a little outdated. This posts covers the updated Pipeline I am starting to deploy along side my Terraform code. Pipeline Overview The pipeline itself has expanded a little and it now not only uses stages but also depending what Terraform is planning on doing it will trigger a manual approval process should there be any resources being destroyed....

June 8, 2021 · 13 min · Russ Mckendrick

GitHub Codespaces and Terraform

I got my invite for GitHub Codespaces the other day and I thought I would have a quick play with it as having an an online IDE sounds like it could come in handy. If you know me — you will know that I am not a developer, but I do a lot of work in Visual Studio Code as that is where I tend to develop work on a lot of the infrastructure as code projects using Terraform and Ansible, as well as Docker projects....

September 20, 2020 · 3 min · Russ Mckendrick

Azure DevOps Terraform Pipeline

In my last post I wrote about how I created an Azure DevOps pipeline using Ansible in a more “Terraform” way, however, although I have used Terraform and Azure DevOps quite a bit I realised I didn’t really have a template for a pipeline. Before we look at the pipeline itself I should point out that is uses the the Terraform Azure Pipeline extension by Microsoft DevLabs from the Visual Studio Marketplace, if you are following along with this post please ensure that the extension is installed in your organisation before proceeding....

May 31, 2020 · 5 min · Russ Mckendrick

Terraform Quirks

I have been using Terraform over the last few months, having not used it in anger for quite a while since the projects I have been working on have been more suitable for using Ansible. However, as I am doing more and more with Microsoft Azure, I found the Ansible modules a little lacking, plus for someone of the projects I have had to use an orchestration tool which can natively run on Windows....

February 9, 2019 · 4 min · Russ Mckendrick

Terraform & Azure

As regular readers will know I really like the tools provided by Hashicorp and today I found an excuse to use one. I needed to bring up a Virtual Machine in Microsoft Azure. I hadn’t logged into Azure for quite a while so imagine my shock when I opened the dashboard, it’s not that great and the beta of the new one isn’t that brilliant either. It was so bad I tweeted about it …....

July 19, 2015 · 5 min · Russ Mckendrick