Skip to content

Commit 91b8ee6

Browse files
ELI-545 - service account creating access to github actions
1 parent 8aa599d commit 91b8ee6

2 files changed

Lines changed: 39 additions & 0 deletions

File tree

infrastructure/stacks/iams-developer-roles/github_actions_policies.tf

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,25 @@ resource "aws_iam_policy" "iam_management" {
611611
"arn:aws:iam::*:role/secret_rotation_lambda_role",
612612
"arn:aws:iam::*:role/secret_rotation_workflow_role"
613613
]
614+
},
615+
# Scoped User management for Tableau
616+
{
617+
Effect = "Allow",
618+
Action = [
619+
"iam:CreateUser",
620+
"iam:DeleteUser",
621+
"iam:UpdateUser",
622+
"iam:TagUser",
623+
"iam:CreateAccessKey",
624+
"iam:DeleteAccessKey",
625+
"iam:UpdateAccessKey",
626+
"iam:PutUserPolicy",
627+
"iam:DeleteUserPolicy",
628+
"iam:GetUser"
629+
],
630+
Resource = [
631+
"arn:aws:iam::${data.aws_caller_identity.current.account_id}:user/tableau-athena-service-account"
632+
]
614633
}
615634
]
616635
})

infrastructure/stacks/iams-developer-roles/iams_permissions_boundary.tf

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,26 @@ data "aws_iam_policy_document" "iam_bootstrap_permissions_boundary" {
366366
]
367367
}
368368

369+
# Specific management for Tableau Athena Service Account
370+
statement {
371+
sid = "AllowTableauServiceAccountManagement"
372+
effect = "Allow"
373+
actions = [
374+
"iam:CreateAccessKey",
375+
"iam:DeleteAccessKey",
376+
"iam:UpdateAccessKey",
377+
"iam:PutUserPolicy",
378+
"iam:DeleteUserPolicy",
379+
"iam:GetUserPolicy",
380+
"iam:TagUser",
381+
"iam:UntagUser",
382+
"iam:GetUser"
383+
]
384+
resources = [
385+
"arn:aws:iam::${data.aws_caller_identity.current.account_id}:user/tableau-athena-service-account"
386+
]
387+
}
388+
369389
# Allow read-only IAM access for Terraform plan/state discovery
370390
statement {
371391
sid = "AllowIamReadAccess"

0 commit comments

Comments
 (0)