diff --git a/README.md b/README.md index 6059171..d9d17ef 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ This module handles creation of AWS SSO permission sets and assignment to AWS SS Before this module can be used, please ensure that the following pre-requisites are met: - Enable AWS Organizations and add AWS Accounts you want to be managed by SSO. [Documentation](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tutorials_basic.html) - Enable AWS SSO. [Documentation](https://docs.aws.amazon.com/singlesignon/latest/userguide/step1.html). -- Create AWS SSO entities (Users and Groups). [Documentation](https://docs.aws.amazon.com/singlesignon/latest/userguide/addusers.html). +- Create AWS SSO entities (Users and Groups) [Documentation](https://docs.aws.amazon.com/singlesignon/latest/userguide/addusers.html) or use identitystore [module](https://github.com/avlcloudtechnologies/terraform-aws-identitystore). - Ensure that Terraform is using a role with permissions required for AWS SSO management. [Documentation](https://docs.aws.amazon.com/singlesignon/latest/userguide/iam-auth-access-using-id-policies.html#requiredpermissionsconsole). ## Usage @@ -65,13 +65,13 @@ module "sso" { | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 0.12.23 | -| [aws](#requirement\_aws) | >= 4.30 | +| [aws](#requirement\_aws) | >= 4.34 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 4.30 | +| [aws](#provider\_aws) | >= 4.34 | ## Modules diff --git a/main.tf b/main.tf index 0e5a909..f6f116c 100644 --- a/main.tf +++ b/main.tf @@ -39,18 +39,22 @@ data "aws_ssoadmin_instances" "this" {} data "aws_identitystore_group" "this" { for_each = toset(local.groups) identity_store_id = tolist(data.aws_ssoadmin_instances.this.identity_store_ids)[0] - filter { - attribute_path = "DisplayName" - attribute_value = each.value + alternate_identifier { + unique_attribute { + attribute_path = "DisplayName" + attribute_value = each.value + } } } data "aws_identitystore_user" "this" { for_each = toset(local.users) identity_store_id = tolist(data.aws_ssoadmin_instances.this.identity_store_ids)[0] - filter { - attribute_path = "UserName" - attribute_value = each.value + alternate_identifier { + unique_attribute { + attribute_path = "UserName" + attribute_value = each.value + } } } diff --git a/versions.tf b/versions.tf index a2ecc46..01aaa0e 100644 --- a/versions.tf +++ b/versions.tf @@ -3,7 +3,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 4.30" + version = ">= 4.34" } } }