Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replication role is created as '-replication' #251

Open
amila-ku opened this issue Sep 18, 2024 · 0 comments · May be fixed by #250
Open

Replication role is created as '-replication' #251

amila-ku opened this issue Sep 18, 2024 · 0 comments · May be fixed by #250
Labels
bug 🐛 An issue with the system

Comments

@amila-ku
Copy link

amila-ku commented Sep 18, 2024

Describe the Bug

S3 role used for file replication is created as '-replication'

Expected Behavior

S3 role used for file replication is should be 'modulename-replication' or 'bucketname-replication'

Steps to Reproduce

Create two s3 buckets
Create s3 replication from one bucket to the other.
Check the role name that gets created.

Observed with Terraform 1.8.0, haven't checked with other versions yet.

Screenshots

I applied the changes with fix in #250. This is the output when i try to apply without the fix.

  # module.s3_bucket_storage.aws_iam_policy.replication[0] must be replaced
-/+ resource "aws_iam_policy" "replication" {
      ~ arn              = "arn:aws:iam::xxxxxxxxxx:policy/my-files-production-replication" -> (known after apply)
      ~ attachment_count = 1 -> (known after apply)
      ~ id               = "arn:aws:iam::xxxxxxxxxx:policy/my-files-production-replication" -> (known after apply)
      ~ name             = "my-files-production-replication" -> "-replication" # forces replacement
      + name_prefix      = (known after apply)
      ~ policy_id        = "xxxxxxxxx" -> (known after apply)
      - tags             = {} -> null
      ~ tags_all         = {} -> (known after apply)
        # (3 unchanged attributes hidden)
    }

  # module.s3_bucket_storage.aws_iam_role.replication[0] must be replaced
-/+ resource "aws_iam_role" "replication" {
      ~ arn                   = "arn:aws:iam::xxxxxx:role/my-files-production-replication" -> (known after apply)
      ~ create_date           = "2024-08-06T15:01:28Z" -> (known after apply)
      ~ id                    = "my-files-production-replication" -> (known after apply)
      ~ managed_policy_arns   = [
          - "arn:aws:iam::xxxxxxxxxxx:policy/KMSReplicationAccess",
          - "arn:aws:iam::xxxxxxxxxxx:policy/my-files-production-replication",
        ] -> (known after apply)
      ~ name                  = "my-files-production-replication" -> "-replication" # forces replacement
      + name_prefix           = (known after apply)
      - tags                  = {} -> null
      ~ tags_all              = {} -> (known after apply)
      ~ unique_id             = "ABCDD" -> (known after apply)
        # (6 unchanged attributes hidden)

Environment

No response

Additional Context

No response

@amila-ku amila-ku added the bug 🐛 An issue with the system label Sep 18, 2024
@amila-ku amila-ku linked a pull request Sep 18, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue with the system
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant