Member-only story

Deploying to Azure with Terraform and GitHub Actions

What started out as building a simple AKS cluster for my own learning, became a full-on CI/CD pipeline…

Will Velida
Level Up Coding
18 min readSep 19, 2024

--

I’m building my own Azure Kubernetes Cluster that I can use for my personal development, and I’ve been wanting to improve my Terraform skills, so I’ve spent a bit of time over the past couple of days getting a Terraform deployment to work with GitHub Actions.

The AzureRM provider has moved on a bit since I’ve used it in anger, so I learnt a lot about the different resources that are available, and how we can use GitHub Actions to deploy Terraform templates to Azure.

In this post, I’ll cover what I’ve done so far with my Terraform templates, how I’ve structured my code, and how I’ve implemented my GitHub Actions workflow. It’s my hope that this blog post has something for everyone, whether you’ve just started out with Terraform and are looking to see how you can automate deployments through GitHub Actions, or you’re someone who’s been deep in Terraform for a while and are just looking for a reference to help you with a particular problem.

If you just want to look at the code, you can do so here. If you want extra context, read on!

What did I want to achieve?

--

--

Written by Will Velida

Lead Software Engineer at Azenix | Ex-MSFT | International Conference Speaker. | GitHub: https://github.com/willvelida

No responses yet

What are your thoughts?