Terraform Azure: Tests

Intro With the exciting new announcement for Terraform Tests I couldn’t help but take them for a test drive. For our use case we will build on a prior post Terraform Azure: Reusable SQL Database Configurations. In the last post we created a module to deploy SQL Servers. Today we will add a new default prefix to SQL Server name and then build a test to check the name of the server. ...

October 22, 2023 · 3 min · Chris Albert

Terraform Azure: Import SQL Database

Intro In this post we will cover how to import an existing Azure SQL Database to Terraform. If the resource wasn’t originally created by Terraform you will need to import it before Terraform can manage it. This comes in handy when you have existing infrastructure and want to start using Terraform later on. For a video walkthrough check out my YouTube video. Here we will use the standard import functionality provided by Terraform. There are other 3rd party tools you can use for this process as well. One of the most popular is Terraformer, I will cover how to use that in a later post. ...

February 15, 2023 · 3 min · Chris Albert

Terraform Azure: Reusable SQL Database Configurations

Intro In this post we are going to build on the previous post Terraform Azure: SQL Database. We will cover how you can use Terraform to create multiple Azure SQL Databases with Terraform modules. We are going to turn the original Terraform into a module so we can create as many databases as we need with identical configurations. Another advantage here is maintenance, if a setting needs to be adjusted you can simply adjust the module and it will propagate to each resource using the module configuration. ...

January 29, 2023 · 4 min · Chris Albert

Terraform Azure: SQL Server VM

Intro In this post we are going to deploy a SQL Server VM in Azure. Deploying a VM requires a little more work than the SQL Database we deployed in the last post. We will need to add some networking resources and configure the host VM. If you need help setting up Terraform please see my prior post, Terraform Azure: Setting Up Your Environment. This post assumes you have an Azure account. If you do not, you can create one for free. ...

January 16, 2023 · 3 min · Chris Albert

Terraform Azure: SQL Database

Intro In this post we are going to cover how you can use Terraform to create an Azure SQL Database. If you need help setting up Terraform please see my prior post, Terraform Azure: Setting Up Your Environment.This post assumes you have an Azure account. If you do not, you can create one for free. We will take a slow approach to accomplishing our task. The goal here is to get familiar with Terraform and its commands by creating some basic resources. Terraform also has some great resources for getting started here. ...

January 15, 2023 · 5 min · Chris Albert

Terraform Azure: Setting Up Your Environment

Intro You want to start using Terraform to manage your Azure infrastructure. To get started you will need to get your local development environment setup. In this post I will walk you through setting up Terraform and the Azure CLI on Windows. For a video walkthrough check out my YouTube video. PowerShell I’m a huge fan of PowerShell so that is my preferred way to interact with Terraform. If you are using Windows you will already have a version of PowerShell available on your machine. I like to use the latest and greatest so I start by installing the latest version which as of this writing is 7.3.1. Download the package and install it, you’re done. ...

January 14, 2023 · 2 min · Chris Albert

Start and Stop VM with Azure Data Factory

Intro In this post I will describe how to manage the state of a VM with Azure Data Factory (ADF). I was inspired to write this post after reading a very similar walk through on Tech Talk Corner. A VM can be in one of several states, for this post we are going to focus on Running and Deallocated. When a VM is running you are being billed for it and able to access its resources. If the VM is deallocated you are not being billed for it and its resources are inaccessible. In many scenarios it makes sense to have a VM in a deallocated state to save on cost and only keep it running when absolutely necessary. ...

May 9, 2022 · 3 min · Chris Albert