Create Users in Azure AD With Terraform

In this Terraform blog post, we will learn how to create a user in Azure Active Directory using Terraform configuration code.

With the Microsoft Azure provider for Terraform, we have the capabilities not only to create compute, storage and application on Azure but also tap into Azure AD and create users and group as you will see below.

Terraform Configuration

In the following confirmation, I am creating a single user in Azure Active Directory with basic information. For instructions in how to use Terraform visit this post.

provider "azurerm" {
  features {}

resource "azuread_user" "example" {
  user_principal_name = "mtest@ntweekly.local"
  display_name        = "My Test"
  mail_nickname       = "mtest"
  password            = "set password"

This blog post was first published on our sister site

1 comment

Leave a comment

Your email address will not be published.