Skip to content

Commit

Permalink
Remove duplicate resources
Browse files Browse the repository at this point in the history
  • Loading branch information
ha7315 committed Oct 10, 2024
1 parent d198491 commit b9c0a67
Showing 1 changed file with 0 additions and 36 deletions.
36 changes: 0 additions & 36 deletions modules/postgres-etl/extract/etl_policies.tf
Original file line number Diff line number Diff line change
Expand Up @@ -87,39 +87,3 @@ data "aws_iam_policy_document" "etl_policy" {
]
}
}

resource "aws_iam_role" "k8s_postgres_etl" {
name = "k8s-postgres-etl"
assume_role_policy = jsonencode({
Version = "2012-10-17",
Statement = [
{
Effect = "Allow",
Principal = {
AWS = "arn:aws:iam::665505400356:role/eks-paas-mountpoint-s3-csi-driver"
},
Action = "sts:AssumeRole"
}
]
})
}

resource "aws_iam_policy" "k8s_trigger_sfn" {
name = "k8s-trigger-sfn"
description = "Allows the k8s-postgres-etl role to trigger the Postgres ETL Step Function"
policy = jsonencode({
Version = "2012-10-17",
Statement = [
{
Effect = "Allow",
Action = "states:StartExecution",
Resource = "arn:aws:states:eu-west-2:259593444005:stateMachine:postgres-etl-s3-to-rds"
}
]
})
}

resource "aws_iam_role_policy_attachment" "k8s_etl_trigger_sfn" {
role = aws_iam_role.k8s_postgres_etl.name
policy_arn = aws_iam_policy.k8s_trigger_sfn.arn
}

0 comments on commit b9c0a67

Please sign in to comment.