Skip to content

[Bug]: #23703 seems to have introduced a breaking change for aws_s3_bucket_replication_configuration rules #26976

@yann-soubeyrand

Description

@yann-soubeyrand

Terraform Core Version

1.3.0

AWS Provider Version

4.32.0

Affected Resource(s)

  • aws_s3_bucket_replication_configuration

Expected Behavior

Already created aws_s3_bucket_replication_configuration resources should not lead to planned diff.

Actual Behavior

After upgrading Terraform AWS provider, some of our aws_s3_bucket_replication_configuration resources started showing diff during plan due to rule ordering mismatch. After some investigation, it seems that the problem has been introduced in #23703: before this change, rule was a set and the ordering of rules didn’t matter. Since this change, rule is a list and the order matters. Therefore, rules which haven’t been created in the same order as their declaration in code now lead to planned diff. The problem is that recreating rules will break the replication I guess. And changing all the resources in our code to match the actual rule order isn’t really feasible.

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

A configuration with lots of aws_s3_bucket_replication_configuration resources having several rule.

Steps to Reproduce

  • Have a lot of aws_s3_bucket_replication_configuration resources created with a Terraform AWS provider in version 4.3.0.
  • Upgrade Terraform AWS provider to 4.32.0.
  • See a lot of diff on rule ordering during terraform plan.

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    breaking-changeIntroduces a breaking change in current functionality; usually deferred to the next major release.bugAddresses a defect in current functionality.service/s3Issues and PRs that pertain to the s3 service.staleOld or inactive issues managed by automation, if no further action taken these will get closed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions