Skip to content

Commit

Permalink
Fix role policy attachments
Browse files Browse the repository at this point in the history
  • Loading branch information
ha7315 committed Oct 15, 2024
1 parent 8d16f52 commit 2dfde2b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions modules/postgres-etl/extract/extract_iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ data "aws_iam_policy_document" "postgres_etl" {

resource "aws_iam_role_policy" "ecs_execution_role__postgres_etl_extract" {
name = "pg-etl-policy-extract"
role = var.ecs_extract_execution_role.name
role = module.extract_task.task_role_name
policy = data.aws_iam_policy_document.postgres_etl.json
}

resource "aws_iam_role_policy" "bucket_access__postgres_etl_extract" {
name = "bucket_access_extract"
role = var.ecs_extract_execution_role.name
role = module.extract_task.task_role_name
policy = data.aws_iam_policy_document.bucket_access.json
}

resource "aws_iam_role_policy" "ecs_exec_policy__postgres_etl_extract" {
name = "ecs_exec_policy_extract"
role = var.ecs_extract_execution_role.name
role = module.extract_task.task_role_name
policy = data.aws_iam_policy_document.ecs_exec_policy.json
}
6 changes: 3 additions & 3 deletions modules/postgres-etl/load/load_iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ data "aws_iam_policy_document" "postgres_etl" {

resource "aws_iam_role_policy" "ecs_execution_role__postgres_etl_load" {
name = "pg-etl-policy-load"
role = var.ecs_load_execution_role.name
role = module.load_task.task_role_name
policy = data.aws_iam_policy_document.postgres_etl.json
}

resource "aws_iam_role_policy" "bucket_access__postgres_etl_load" {
name = "bucket_access_load"
role = var.ecs_load_execution_role.name
role = module.load_task.task_role_name
policy = data.aws_iam_policy_document.bucket_access.json
}

resource "aws_iam_role_policy" "ecs_exec_policy__postgres_etl_load" {
name = "ecs_exec_policy_load"
role = var.ecs_load_execution_role.name
role = module.load_task.task_role_name
policy = data.aws_iam_policy_document.ecs_exec_policy.json
}

0 comments on commit 2dfde2b

Please sign in to comment.