Override File in Terraform and Azure

I try to find a useful example that demonstrates functionality when I create these posts and videos.  Unfortunately, with Override files in Terraform, that was not so easy.  As a matter of fact, you may never need to use override files at all, except for some specific situations we’ll get to shortly.  With that said, Override files are another tool in the Terraform toolbelt and something you should be aware of if planning on a Terraform certification.

Continue reading “Override File in Terraform and Azure”

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”