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

encryption_configuration keeps getting re-added #243

Closed
stephan242 opened this issue Aug 14, 2024 · 0 comments · Fixed by #244
Closed

encryption_configuration keeps getting re-added #243

stephan242 opened this issue Aug 14, 2024 · 0 comments · Fixed by #244
Labels
bug 🐛 An issue with the system

Comments

@stephan242
Copy link
Contributor

Describe the Bug

I've got the module configured with this:

  s3_replication_rules = [
    {
      id                               = "replication-bucket"
      status                           = "Enabled"
      prefix                           = "/"
      priority                         = 5
      destination_bucket               = module.replication_bucket.bucket_arn
      delete_marker_replication_status = "Enabled"
      destination = {
        account_id = data.aws_caller_identity.current.account_id
        metrics = {                                                           
          status = "Enabled",
          event_threshold = {
            minutes = 15
          }
        },       
        replication_time = {
          status = "Enabled",
          event_threshold = {
            minutes = 15
          }
        }        
      }        
    }        
  ]        

Every time I apply it I get this:

OpenTofu will perform the following actions:

  # module.backup_bucket.aws_s3_bucket_replication_configuration.default[0] will be updated in-place
  ~ resource "aws_s3_bucket_replication_configuration" "default" {
        id     = "jdx-stg1-backup"
        # (2 unchanged attributes hidden)

      ~ rule {
            id       = "replication-bucket"
            # (2 unchanged attributes hidden)

          ~ destination {
                # (3 unchanged attributes hidden)

              + encryption_configuration {}

                # (2 unchanged blocks hidden)
            }

            # (2 unchanged blocks hidden)
        }
    }

Expected Behavior

To not re-add the empty encryption_configuration at every apply

Steps to Reproduce

Apply s3_replication_rules without setting the encryption_configuration

Screenshots

No response

Environment

OpenTofu v1.6.2
+ provider registry.opentofu.org/hashicorp/aws v5.40.0

Additional Context

No response

@stephan242 stephan242 added the bug 🐛 An issue with the system label Aug 14, 2024
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