Skip to content

Commit e8af265

Browse files
authored
Update deprecated identitystore filter (#11)
1 parent 8c471fe commit e8af265

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This module handles creation of AWS SSO permission sets and assignment to AWS SS
77
Before this module can be used, please ensure that the following pre-requisites are met:
88
- 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)
99
- Enable AWS SSO. [Documentation](https://docs.aws.amazon.com/singlesignon/latest/userguide/step1.html).
10-
- Create AWS SSO entities (Users and Groups). [Documentation](https://docs.aws.amazon.com/singlesignon/latest/userguide/addusers.html).
10+
- 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).
1111
- 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).
1212

1313
## Usage
@@ -65,13 +65,13 @@ module "sso" {
6565
| Name | Version |
6666
|------|---------|
6767
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.12.23 |
68-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.30 |
68+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.34 |
6969

7070
## Providers
7171

7272
| Name | Version |
7373
|------|---------|
74-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.30 |
74+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.34 |
7575

7676
## Modules
7777

main.tf

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,22 @@ data "aws_ssoadmin_instances" "this" {}
3939
data "aws_identitystore_group" "this" {
4040
for_each = toset(local.groups)
4141
identity_store_id = tolist(data.aws_ssoadmin_instances.this.identity_store_ids)[0]
42-
filter {
43-
attribute_path = "DisplayName"
44-
attribute_value = each.value
42+
alternate_identifier {
43+
unique_attribute {
44+
attribute_path = "DisplayName"
45+
attribute_value = each.value
46+
}
4547
}
4648
}
4749

4850
data "aws_identitystore_user" "this" {
4951
for_each = toset(local.users)
5052
identity_store_id = tolist(data.aws_ssoadmin_instances.this.identity_store_ids)[0]
51-
filter {
52-
attribute_path = "UserName"
53-
attribute_value = each.value
53+
alternate_identifier {
54+
unique_attribute {
55+
attribute_path = "UserName"
56+
attribute_value = each.value
57+
}
5458
}
5559
}
5660

versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ terraform {
33
required_providers {
44
aws = {
55
source = "hashicorp/aws"
6-
version = ">= 4.30"
6+
version = ">= 4.34"
77
}
88
}
99
}

0 commit comments

Comments
 (0)