» azuread_group

Manages a Group within Azure Active Directory.

» Example Usage

Basic example

resource "azuread_group" "example" {
  name = "A-AD-Group"

A group with members

resource "azuread_user" "example" {
  display_name          = "J Doe"
  password              = "notSecure123"
  user_principal_name   = "j.doe@terraform.onmicrosoft.com"

resource "azuread_group" "example" {
  name    = "MyGroup"
  members = [ "${azuread_user.example.object_id}" /*, more users */ ]

» Argument Reference

The following arguments are supported:

  • name - (Required) The display name for the Group. Changing this forces a new resource to be created.
  • members (Optional) A set of members who should be present in this Group. Supported Object types are Users, Groups or Service Principals.
  • owners (Optional) A set of owners who own this Group. Supported Object types are Users or Service Principals.

» Attributes Reference

The following attributes are exported:

  • id - The Object ID of the Group.

  • name - The Display Name of the Group.

  • members - The Members of the Group.

  • owners - The Members of the Group.

» Import

Azure Active Directory Groups can be imported using the object id, e.g.

terraform import azuread_group.my_group 00000000-0000-0000-0000-000000000000