-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Issue with aws_s3_bucket_replication_configuration producing inconsistent final plan #23487
Comments
I am facing the same issue and I think i have a bit more details to add. |
That matches what we observed as well. We have multiple other S3 replication rules set on S3 buckets, though others all have at least 2 separate ones. This is the first time we've set-up a bucket with a singular rule. |
Hi @bfox1793 , thank you for raising this issue. So the diff I'm seeing when using the provided configuration above is the following. Is this the case on your end as well?
My initial guess is the empty |
Yup, that's the case for me as well. For what it's worth - the issue seems to appear similarly on both |
Hmm this is actually somewhat reminiscent of hashicorp/terraform-plugin-sdk#588, but in this case we have various TypeLists nested within the root TypeSet i.e the |
@bfox1793 I didn't notice this before, but it looks like if you use
|
Looks like that worked for me as well @anGie44 ! Still a strange bug, but at least this prevents us from needing to delete / recreate the replication rule whenever we modify something in our project (we isolated it for now to avoid this :) ) |
Awesome @bfox1793 ! Though, yep not an ideal long-term solution 😅 . |
Hi @bfox1793 , thanks again for you input. The linked PR should address this odd behavior as it appears that by not sending the |
I had to use the workaround even with provider 4.5 |
Hi @mbotmcc 👋 apologies you are still running into this bug. Do you mind proving configuration details and any debug logs available to you to further investigate? |
TF:
Error:
|
Hi @mbotmcc, thank you for providing your config. Can you provide the plan-time diff you are seeing before running the apply that throws the error above? I haven't been able to reproduce locally with the same configuration in |
Not sure if this makes a difference but we're applying this to an existing S3 bucket which was previously created with provider v3 and this is running in the
|
Ahh i see, yep can reproduce the diff you are seeing after upgrading from 4.4 -> 4.5; I didn't try that right away 😅 It wasn't readily apparent when creating the the new resources on v4.5 only. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Community Note
Terraform CLI and Terraform AWS Provider Version
Terraform v1.1.6
on darwin_arm64
Affected Resource(s)
Terraform Configuration Files
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
Debug Output
Provided below - can add additional details if necessary
Panic Output
N/A
Expected Behavior
There should be a noop on subsequent
terraform plan
since none of the replication configs changed.Actual Behavior
Terraform detects a diff in the replication configuration. If you apply, it spits out the following error:
Steps to Reproduce
terraform apply
terraform apply
again. Note the detected diff although no configurations have changedImportant Factoids
The workaround is to delete the replication rule before running every
terraform apply
, though this seems superfluous and breaks the paradigm of using terraform for state management.References
N/A
The text was updated successfully, but these errors were encountered: