-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Terraform does not apply generated plan and clears out the state #30178
Comments
Hi @favoretti, Thanks for filing the issue, and sorry you are experiencing this. I think we are going to need some more information, especially the logs to figure out what might be going wrong here. To reduce the amount of logs, and since the planning phase looks like it's working, you could save the plan to a file and only capture the logs from the apply step if you need. Plus if that changes the behavior at all, it could give us some more information for troubleshooting. Is terraform being run completely locally or is this executing in Terraform Cloud, and how is your state being stored? Thanks! |
Hi @jbardin, Thanks, I completely understand the need for more information on this one.
Now as for the log.. Can I share the trace log of apply phase with you in somewhat more secure fashion than posting it here? Thanks, |
Hi @favoretti, You can encrypt the log file if you would like. If you are a keybase user you can encrypt the logs through there (same username for me, and GitHub is verified), or using gpg with the key at https://keybase.io/jbardin/pgp_keys.asc. If you are more comfortable using the Hashicorp's public key (https://www.hashicorp.com/security), we can also use that (just takes a little more time to get access to decrypt the content). If you have any other ideas as what may be different for this particular configuration, it might also help with troubleshooting. Thanks! |
Hi @jbardin, I've uploaded trace log of apply to keybase. I've tried to sanitize the file as much as possible, while keeping what's important. Let me know if I over-sanitized it by accident :) Thank you :) |
Thanks @favoretti, I think I have what I need. I haven't been able to reproduce this yet, but from manual inspection of the source I have a good hypothesis. |
Thanks, @jbardin! |
Glad to see this fixed; this happened to us but I couldn't nail down a solid repro so I didn't open an issue. Thankfully, we had versioning enabled on the bucket our state was stored in, so we were able to recover. That said, seeing no output back from |
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. |
Terraform Version
Terraform creates a plan, then doesn't even try to apply it and uploads an empty state..
Debug Output
Due to sensitivity of the log I can provide it upon request after some sanitizing.
Expected Behavior
Plan should have been applied.
Actual Behavior
Plan was not applied and an empty state (!) was uploaded back.
The text was updated successfully, but these errors were encountered: