-
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
bug: aws_s3_bucket_website_configuration
strips replace_key_prefix_with
with empty string
#24048
Comments
Noting here that the behavior is similar to hashicorp/terraform-plugin-sdk#216 in that the empty string value for |
Similar thing happens with a condition. If you set a redirect rule without a condition, everytime you run apply it tries to add an empty condition block to the the routing_rule
|
HI @PedroArvela et al 👋 You may have seen this already but just wanted to drop a note that while a fix to the |
Thanks @anGie44 , I actually hadn't seen it! Good to know there is a workaround for it! :D I'll still leave this issue open for reference and tracking, but I'll update the description with the workaround |
Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label. If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you! |
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
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
https://gist.github.com/PedroArvela/1fece7fa18a9314e419cb513258ab12f
(debug is truncated in web view, but there's a link to see the full raw file at the start)
Expected Behavior
The website configuration resource should have an empty string
replace_key_prefix_with
Actual Behavior
The website configuration resource is missing the
replace_key_prefix_with
condition altogether:Steps to Reproduce
Important Factoids
This is serious as it breaks existing redirects in the migration process from the aws_s3_bucket blocks to the individual resources. We actually found the issue in provider version 3.75.1.It is currently impossible with the new resource to create a rule that strips a certain prefix altogether. Trying to apply will either fail or, if there is a domain_name, apply but break the redirect altogether.From version 4.15.0 onward this is no longer an issue as a
routing_rules
parameter that behaves as the previous one was made available.References
The text was updated successfully, but these errors were encountered: