-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
aws_s3_bucket_website_configuration is temporarily removed during subsequent apply commands #24883
Comments
Cross Linked: hashicorp/terraform#31084 |
Hey @ckeyes88 👋 Thank you for taking the time to raise this! So that we have all of the necessary information in order to look into this, can you supply debug logs (redacted as needed) as well? |
Hey @justinretzolk Thanks for the response. After a little more testing I've narrowed down what I believe I'm seeing to an issue where every other I've provided both the debug logs as well as the std output for four runs (redacted). What happened was I ran an automated deployment from my github action (output not included). Then noticed that the s3 buckets both showed that static website hosted was NOT enabled. I then re triggered the build and afterwards everything was back to normal. To test out my hypothesis I then ran
It seems that one run is removing the enabling and then the next time around it detects that it's not configured and creates it. Let me know if you need anything else from my end. |
@justinretzolk my guess after looking at this more without knowing too much about the internals is that the provider is still using the deprecated |
Hey @ckeyes88 -- Thank you for that additional information. With that in mind, and after I noticed you're using AWS Provider version For the
# within the aws_s3_bucket resource
lifecycle {
ignore_changes = [
website
]
} |
Ah thanks @justinretzolk I must have missed that. I was hoping there was something like that that would correct this. Just to be clear is 3.x the correct stable version to be using? Is this a bug that will change in the future or is this the expected behavior? Just trying to make sure I properly understand. |
Hey @ckeyes88 Glad that information helped! Once you've upgraded to the |
Good to know @justinretzolk. Thanks for the heads up. For some reason I thought I was already on the latest version. Glad this was so easy to sort out and really appreciate your quick response and all the work you all do over there to make my dev/ops life easier haha. Have a great rest of your day! |
@ckeyes88 I'm glad that got you sorted out, and very much appreciate the kind words! I hope you have a great rest of your day as well! |
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. |
Hi there, I'm not sure if this is a bug or my own lack of understanding around the s3 bucket and s3 bucket website configuration resources. I recently set up a terraform deployment to create a static site with an s3 bucket, s3 bucket website configuration, cloudfront distribution, and some dns records.
Everything deploys and appears to work fine initially but I noticed that on subsequent plan and apply runs terraform gives the following notice even though I haven't changed anything outside of terraform:
Once it completes the apply the website configuration
Terraform Version
Terraform Configuration Files
Debug Output
Expected Behavior
I would expect that terraform could detect when a website configuration exists and not replace it which causes a temporary 404 error while the endpoint is being re configured
Actual Behavior
Terraform appears to not that the resource already exists and things it needs to create a new one causing a temporary outage on the website during application
Steps to Reproduce
... Once it's done deploying don't change anything
The text was updated successfully, but these errors were encountered: