Skip to content

Commit

Permalink
Adding DTO to the AWS SSO groups (#314)
Browse files Browse the repository at this point in the history
* Adding DTO for AWS SSO

* Formatting
  • Loading branch information
sylviamclaughlin authored Oct 15, 2024
1 parent ed4c623 commit 706dfe9
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#
# Accounts: assign permissions
#
locals {
digital_transformation_office_production_permission_sets = [
{
group = aws_identitystore_group.digital_transformation_office_production_admin,
permission_set = data.aws_ssoadmin_permission_set.aws_administrator_access,
},
{
group = aws_identitystore_group.digital_transformation_office_production_read_only,
permission_set = data.aws_ssoadmin_permission_set.aws_read_only_access,
},
]
}

resource "aws_ssoadmin_account_assignment" "digital_transformation_office_production" {
for_each = { for perm in local.digital_transformation_office_production_permission_sets : "${perm.group.display_name}-${perm.permission_set.name}" => perm }

instance_arn = local.sso_instance_arn
permission_set_arn = each.value.permission_set.arn

principal_id = each.value.group.group_id
principal_type = "GROUP"

target_id = local.digital_transformation_office_production_account_id
target_type = "AWS_ACCOUNT"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#
# Production
#
resource "aws_identitystore_group" "digital_transformation_office_production_admin" {
display_name = "DigitalTransformationOffice-Production-Admin"
description = "Grants members administrator access to the Digital Transformation Office Production account."
identity_store_id = local.sso_identity_store_id
}

resource "aws_identitystore_group" "digital_transformation_office_production_read_only" {
display_name = "DigitalTransformationOffice-Production-ReadOnly"
description = "Grants members read-only access to the Digital Transformation Office Production account."
identity_store_id = local.sso_identity_store_id
}
2 changes: 2 additions & 0 deletions terragrunt/org_account/iam_identity_center/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ locals {

digital_credentials_dev_account_id = "767397971970"

digital_transformation_office_production_account_id = "730335533085"

forms_production_account_id = "957818836222"
forms_staging_account_id = "687401027353"

Expand Down

0 comments on commit 706dfe9

Please sign in to comment.