Skip to content

Commit

Permalink
Change variable for custom bucket_replication_name_suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
marianod92 committed Oct 27, 2022
1 parent 81264ea commit 29dcfef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions bucket_replication.tf
Expand Up @@ -38,7 +38,7 @@ resource "aws_iam_role" "bucket_replication" {
count = var.bucket_replication_enabled ? 1 : 0

provider = aws.primary
name = format("%s-%s-%s-bucket-replication-module", var.namespace, var.stage, var.name)
name = format("%s-%s-%s-%s", var.namespace, var.stage, var.name, var.bucket_replication_name_suffix)
assume_role_policy = <<POLICY
{
"Version": "2012-10-17",
Expand All @@ -60,7 +60,7 @@ resource "aws_iam_policy" "bucket_replication" {
count = var.bucket_replication_enabled ? 1 : 0

provider = aws.primary
name = format("%s-%s-%s-%s", var.namespace, var.stage, var.name, var.bucket_replication_role_name)
name = format("%s-%s-%s-%s", var.namespace, var.stage, var.name, var.bucket_replication_name_suffix)
policy = <<POLICY
{
"Version": "2012-10-17",
Expand Down
4 changes: 2 additions & 2 deletions variables.tf
Expand Up @@ -136,10 +136,10 @@ variable "bucket_replication_name" {
description = "Set custom name for S3 Bucket Replication"
}

variable "bucket_replication_role_name" {
variable "bucket_replication_name_suffix" {
type = string
default = "bucket-replication"
description = "Set custom IAM Role name for S3 Bucket Replication"
description = "Set custom suffix for S3 Bucket Replication IAM Role/Policy"
}

variable "enforce_ssl_requests" {
Expand Down

0 comments on commit 29dcfef

Please sign in to comment.