Create Azure Active Directory Groups With Terraform

Continuing with Terraform posts, today, I will show you how to create an Azure Active Directory group with Terraform.

In the previous post I have shown you how to create an Active Directory user with Terraform and now we will get into groups.

If you need to set up Terraform on your Windows or macOS machine please visit the following post.

Terraform Configuration

In the following Terraform configuration I am creating a single Azure Active Directory group called Terraform admins.

terraform {
required_providers {
azuread = {
source = "hashicorp/azuread"
version = "1.0.0"
}
}
}

provider "azuread" {
# Configuration options
}
resource "azuread_group" "terraformadmins"{
name = "Terrafrom Admins"
description = "An Azure AD Group for Terraform administrators"
prevent_duplicate_names = true
}

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.