Wednesday, March 24, 2021

Adding AAD user to Azure SQL via Terraform

You might have heard about various authentication mechanisms are used for database access management securely. Azure SQL server also has its own authentication mechanism as single administer account which has control over the entire server. Other than this super admin, you can create second administrator account as Azure AD account. You can easily add AAD (Azure Active Directory) users as  admin to Azure SQL via the Azure portal. However, if you want to deploy Azure SQL server via IaC let's look at using Terraform to add an AAD user as admin to the Azure SQL in this blog.

We can create resource group, Azure Key Vault to store SQL server password, Azure SQL server, Azure AD group using Terraform script. Main.tf of the sample script as follows.

Saturday, March 20, 2021

IaC with Terraform for Shared Azure Resources in Multiple Subscriptions

 While you are working with multiple azure subscriptions there might be situations where you need to share infrastructure in more than one subscription. If you try to automate such situation, you can achieve that using Terraform as explained in this post.

Pre-requisites: 

  • User should have access to at least two azure subscriptions
  • Create resource group in one subscription.