» azuread_group_member

Manages a single Group Membership within Azure Active Directory.

» Example Usage


data "azuread_user" "example" {
  user_principal_name = "jdoe@hashicorp.com"
}

resource "azuread_group" "example" {
  name = "my_group"
}

resource "azuread_group_member" "example" {
  group_object_id   = "${azuread_group.example.id}"
  member_object_id  = "${data.azuread_user.example.id}"
}

» Argument Reference

The following arguments are supported:

  • group_object_id - (Required) The Object ID of the Azure AD Group you want to add the Member to. Changing this forces a new resource to be created.
  • member_object_id - (Required) The Object ID of the Azure AD Object you want to add as a Member to the Group. Supported Object types are Users, Groups or Service Principals. Changing this forces a new resource to be created.

» Attributes Reference

The following attributes are exported:

  • id - The ID of the Azure AD Group Member.

» Import

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

terraform import azuread_group_member.test 00000000-0000-0000-0000-000000000000/11111111-1111-1111-1111-111111111111