Skip to content

Commit

Permalink
Update naming
Browse files Browse the repository at this point in the history
  • Loading branch information
ha7315 committed Nov 3, 2024
1 parent f9d387f commit 195bf26
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions modules/postgres-etl/extract/extract_iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ data "aws_iam_policy_document" "rds_to_s3_sfn" {
}
}

resource "aws_iam_policy" "k8s_monitor_sfn" {
name = "k8s-monitor-sfn"
resource "aws_iam_policy" "eks_paas_jenkins_monitor_sfn" {
name = "${var.migrator_name}-eks-paas-jenkins-monitor-sfn"
description = "Allows the k8s-postgres-etl role to monitor the Postgres ETL Step Function"
policy = jsonencode({
Version = "2012-10-17",
Expand Down Expand Up @@ -283,7 +283,7 @@ resource "aws_iam_role_policy" "s3__postgres_etl_extract" {
policy = data.aws_iam_policy_document.s3.json
}

resource "aws_iam_role_policy_attachment" "k8s_etl_monitor_sfn" {
role = "k8s-${var.migrator_name}"
policy_arn = aws_iam_policy.k8s_monitor_sfn.arn
resource "aws_iam_role_policy_attachment" "eks_paas_jenkins_monitor_sfn" {
role = "${var.migrator_name}-eks-paas-jenkins"
policy_arn = aws_iam_policy.eks_paas_jenkins_monitor_sfn.arn
}
10 changes: 5 additions & 5 deletions modules/postgres-etl/load/load_iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ data "aws_iam_policy_document" "s3_to_rds_sfn" {
}
}

resource "aws_iam_policy" "k8s_trigger_sfn" {
name = "k8s-trigger-sfn"
resource "aws_iam_policy" "eks_paas_jenkins_trigger_sfn" {
name = "${var.migrator_name}-eks-paas-jenkins-trigger-sfn"
description = "Allows the k8s-postgres-etl role to trigger the Postgres ETL Step Function"
policy = jsonencode({
Version = "2012-10-17",
Expand Down Expand Up @@ -283,7 +283,7 @@ resource "aws_iam_role_policy" "s3__postgres_etl_load" {
policy = data.aws_iam_policy_document.s3.json
}

resource "aws_iam_role_policy_attachment" "k8s_etl_trigger_sfn" {
role = "k8s-${var.migrator_name}"
policy_arn = aws_iam_policy.k8s_trigger_sfn.arn
resource "aws_iam_role_policy_attachment" "eks_paas_jenkins_trigger_sfn" {
role = "${var.migrator_name}-eks-paas-jenkins"
policy_arn = aws_iam_policy.eks_paas_jenkins_trigger_sfn.arn
}
4 changes: 2 additions & 2 deletions modules/postgres-etl/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ module "load" {
}

# Shared resources
resource "aws_iam_role" "k8s_postgres_etl" {
name = "k8s-${var.migrator_name}"
resource "aws_iam_role" "eks_paas_jenkins" {
name = "${var.migrator_name}-eks-paas-jenkins"
assume_role_policy = jsonencode({
Version = "2012-10-17",
Statement = [
Expand Down

0 comments on commit 195bf26

Please sign in to comment.