File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
modules/iam_identity_users Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -3,8 +3,14 @@ data "aws_ssoadmin_instances" "this" {}
3
3
4
4
# Create SSO Groups
5
5
resource "aws_identitystore_group" "this" {
6
- for_each = { for group_name in toset (flatten ([for user in values (var. users ) : user . groups ])) : group_name => group_name }
6
+ identity_store_id = tolist (data. aws_ssoadmin_instances . this . identity_store_ids )[0 ]
7
+ display_name = " MyGroup"
8
+ description = " Some group name"
9
+ }
7
10
11
+
12
+ resource "aws_identitystore_group" "this" {
13
+ for_each = { for group_name in var . groups : group_name => group_name }
8
14
display_name = each. value
9
15
description = format (" SSO group for %s" , each. value )
10
16
identity_store_id = tolist (data. aws_ssoadmin_instances . this . identity_store_ids )[0 ]
Original file line number Diff line number Diff line change @@ -11,4 +11,10 @@ variable "email_domain" {
11
11
description = " Domain used for user email accounts"
12
12
type = string
13
13
default = " example.com"
14
+ }
15
+
16
+ variable "groups" {
17
+ description = " List of IAM identity center groups to create"
18
+ type = set (string )
19
+ default = []
14
20
}
You can’t perform that action at this time.
0 commit comments