Skip to content

Commit

Permalink
add cognito user groups
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerthome committed Oct 18, 2024
1 parent cd75473 commit eb6cf5f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions terraform-incubator/home-unite-us/dev/cognito.tf
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,22 @@ resource "aws_cognito_user_pool" "homeuniteus" {
}
}

locals {
groups = [
"Hosts",
"Guests",
"Coordinators",
"Admins"
]
}

resource "aws_cognito_user_group" "homeuniteus" {
for_each = toset(local.groups)
name = each.value
user_pool_id = aws_cognito_user_pool.homeuniteus.id
description = "Managed by Terraform"
}

resource "aws_cognito_user_pool_domain" "homeuniteus" {
domain = "homeuniteus"
user_pool_id = aws_cognito_user_pool.homeuniteus.id
Expand Down

0 comments on commit eb6cf5f

Please sign in to comment.