Skip to content

Commit

Permalink
use aws_iam_role_policy to fix deprecation warning (#1063)
Browse files Browse the repository at this point in the history
  • Loading branch information
one000mph authored Dec 13, 2024
1 parent 977a120 commit 2126e5d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions terraform-modules/cur-setup-source/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,12 @@ resource "aws_iam_role" "replication" {
name_prefix = "${var.resource_prefix}-replication"
path = "/${var.resource_prefix}/"
assume_role_policy = data.aws_iam_policy_document.s3_assume_role.json
inline_policy {
name = "S3Replication"
policy = data.aws_iam_policy_document.replication.json
}
}

resource "aws_iam_role_policy" "replication" {
name = "${var.resource_prefix}-replication-policy"
role = aws_iam_role.replication.id
policy = data.aws_iam_policy_document.replication.json
}

resource "aws_s3_bucket_replication_configuration" "replication" {
Expand Down

0 comments on commit 2126e5d

Please sign in to comment.