Dynamic Blocks in Terraform with Azure

Resources in Terraform are deployed as top-level resources.  A server or App Service plan for example.  These top-level resources include inline, or sub-resources; blocks of code that configure the top-level resource. In this blog post and video, we use a Network Security Group (NSG) as a Dynamic block example by creating multiple security rules as inline or sub-resources.

Continue reading “Dynamic Blocks in Terraform with Azure”

Remote Backend State with Terraform and Azure Storage

Until now, we have developed our Infrastructure code as a single developer. As a result, our state file is created and maintained on the local development computer.  This is fine for a team of one, but having multiple versions of a state file can become an issue as others join in.  This post and accompanying video examines using a remote backend state on Azure Storage to host shared state files.

Continue reading “Remote Backend State with Terraform and Azure Storage”

Use Existing Resources with Data Sources in Terraform and Azure

Use Terraform long enough, and eventually, we’ll need to use an existing resource not managed by Terraform as part of the deployment.  A typical example is deploying a network-enabled resource, a virtual machine, for instance, to an existing virtual network.  This post and accompanying video demonstrate using an existing Azure resource as part of a Terraform deployment. 

Continue reading “Use Existing Resources with Data Sources in Terraform and Azure”

Use For_Each in a Terraform Module with Azure VNets and Bastion Host

You have laded on another post and video in a series on Terraform and Azure.  This post and accompanying video looks at a more complicated module example that uses a looping function to create multiple, similar resources.  The example uses Terraform to create an Azure Bastion Host and VNet with multiple subnets in Azure. 

Continue reading “Use For_Each in a Terraform Module with Azure VNets and Bastion Host”

Modules and Outputs with Terraform and Azure

Modules and outputs are two important concepts for creating quality, reusable Terraform code.  This post and accompanying video put those concepts into practice.  This is a lengthy subject, so grab a drink of your choice and settle in for the ride.  Also, if you are getting started with Terraform, be sure to check out my other articles and videos on using Terraform.  The information below assumes some knowledge of Terraform.

Continue reading “Modules and Outputs with Terraform and Azure”

Input Variables with Terraform and Azure

Variables allow us to easily modify terraform configurations with minimal changes to the code.  Variables are an essential part of making reusable code across multiple deployments or environments.  In this post and accompanying video, we will review using variables in Terraform.

Continue reading “Input Variables with Terraform and Azure”

Terraform Workflow with Azure: Write, Plan and Apply

This post is the second part of a multi-part blog post and video on Terraform with Azure.  The previous video located here went over configuring an environment for Terraform and Azure.  This post reviews the basic Terraform workflow.  In the process, we create our first deployment to Azure with Terraform.

Continue reading “Terraform Workflow with Azure: Write, Plan and Apply”

Getting started with Terraform and Azure: Overview and Setup

If you landed here, I assume you know what Terraform is and why to use it.  If that’s not the case, check out the monolog on my video below that covers those topics.  This post, however, is dedicated to the steps required to prepare a Windows 10 computer for Terraform.  The steps are similar if using Windows 11.  The most significant difference is the start menu is in the center bottom of your screen.

Continue reading “Getting started with Terraform and Azure: Overview and Setup”