Skip to content

Commit 8ad0aac

Browse files
authored
reduce the size of department ecs base policy (#2116)
1 parent c204262 commit 8ad0aac

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

terraform/modules/department/50-aws-iam-policies.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -959,7 +959,6 @@ resource "aws_iam_policy" "department_ecs_passrole" {
959959

960960
data "aws_iam_policy_document" "ecs_department_policy" {
961961
source_policy_documents = [
962-
data.aws_iam_policy_document.s3_department_access.json,
963962
data.aws_iam_policy_document.secrets_manager_read_only.json,
964963
data.aws_iam_policy_document.read_glue_scripts_and_mwaa_and_athena.json,
965964
data.aws_iam_policy_document.crawler_can_access_jdbc_connection.json

terraform/modules/department/50-aws-iam-roles.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,3 +157,8 @@ resource "aws_iam_role_policy_attachment" "glue_access_attachment_to_ecs_role" {
157157
role = aws_iam_role.department_ecs_role.name
158158
policy_arn = aws_iam_policy.glue_access.arn
159159
}
160+
161+
resource "aws_iam_role_policy" "grant_s3_access_to_ecs_role" {
162+
role = aws_iam_role.department_ecs_role.name
163+
policy = data.aws_iam_policy_document.s3_department_access.json
164+
}

0 commit comments

Comments
 (0)