Introduction to IaC: Deploying Data infrastructure to Azure using Terraform (Part 3 - Azure SQL Database)

In Part 1 , we explain the basics and prerrequisites to work with Terraform. In Part 2 , we created our first Azure resource. On this post we will create an Azure SQL Database and configure it so we can access it right away. Example 2: Deploy and configure an Azure SQL database To create an Azure SQL database, we need at least the following: Resource group (we already have it from the previous example) Azure SQL Server Azure SQL database At least one firewall rule We can obtain code snippets on each resource from the Terraform provider documentation we checked on the previous example: https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs We proceed to add each component on the main.tf file (do not delete the previous code we have there) At the end we should have something like this (just check resource names and parameters to match what you want.) terraform { required_providers { azurerm = { source = "hashicorp/azurerm" version = "3.