Skip to content

Commit

Permalink
Merge pull request #8 from deanp3it/alternate_identifier
Browse files Browse the repository at this point in the history
tardigrade: Update sso-admin module to use `alternate_identifier` instead of deprecated `filter`
  • Loading branch information
deanp3it authored Mar 22, 2023
2 parents 0e215a1 + e729d49 commit 5f9f3f9
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.0.0
current_version = 2.0.0
commit = True
message = Bumps version to {new_version}
tag = False
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

### 2.0.0

**Commit Delta**: n/a

**Released**: 2023.03.21

**Summary**:

* Updates to use AWS module 4.40.0
* Replaces "filter" with "alternate_identifier"

### 1.0.0

**Commit Delta**: n/a
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ Terraform module to manage AWS SSO Admin resources, including:
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.30 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.40.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.30 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.40.0 |

## Resources

Expand Down
4 changes: 2 additions & 2 deletions modules/account-assignment/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ Module for managing an AWS SSO Account Assignment
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.30 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.40.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.30 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.40.0 |

## Resources

Expand Down
17 changes: 11 additions & 6 deletions modules/account-assignment/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@ data "aws_identitystore_group" "this" {

identity_store_id = local.identity_store_id

filter {
attribute_path = "DisplayName"
attribute_value = var.account_assignment.principal_name
alternate_identifier {
unique_attribute {
attribute_path = "DisplayName"
attribute_value = var.account_assignment.principal_name
}
}
}

Expand All @@ -42,9 +44,11 @@ data "aws_identitystore_user" "this" {

identity_store_id = local.identity_store_id

filter {
attribute_path = "UserName"
attribute_value = var.account_assignment.principal_name
alternate_identifier {
unique_attribute {
attribute_path = "UserName"
attribute_value = var.account_assignment.principal_name
}
}
}

Expand All @@ -57,3 +61,4 @@ locals {
identity_store_id = var.account_assignment.identity_store_id != null ? var.account_assignment.identity_store_id : data.aws_ssoadmin_instances.this[0].identity_store_ids[0]
sso_instance_arn = var.account_assignment.instance_arn != null ? var.account_assignment.instance_arn : data.aws_ssoadmin_instances.this[0].arns[0]
}

2 changes: 1 addition & 1 deletion modules/account-assignment/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 4.30"
version = ">= 4.40.0"
}
}
}
4 changes: 2 additions & 2 deletions modules/permission-set/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ Module for managing an AWS SSO Permission Set
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.30 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.40.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.30 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.40.0 |

## Resources

Expand Down
2 changes: 1 addition & 1 deletion modules/permission-set/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 4.30"
version = ">= 4.40.0"
}
}
}
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 4.30"
version = ">= 4.40.0"
}
}
}

0 comments on commit 5f9f3f9

Please sign in to comment.