Creates an Amazon Connect User Hierarchy Group with a parent group and a child group, each with specified instance IDs, names, and a parent group ID for the child.

Terraform Template

resource "aws_connect_user_hierarchy_group" "child" {
  instance_id = "aaaaaaaa-bbbb-cccc-dddd-111111111111"
  name = "child"
  parent_group_id = aws_connect_user_hierarchy_group.parent.hierarchy_group_id

  tags = {
    Name = "Example User Hierarchy Group Child"
  }
}

resource "aws_connect_user_hierarchy_group" "parent" {
  instance_id = "aaaaaaaa-bbbb-cccc-dddd-111111111111"
  name = "parent"

  tags = {
    Name = "Example User Hierarchy Group Parent"
  }
}