-
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
Revert #7464 and allow an empty state #7521
Conversation
I'd also like to try and get a unit test in here to verify remote state initialization, since that was completely missed when #7464 was merged. |
Seeing #7509 here. I'll build with this PR and let you know if this fixes our issue. |
@glasser: I'm going to back this out mostly, as I've found other corner cases here. Since I've elbow deep in the remote state code already, what issue are you seeing? |
(ie, if this isn't clear — I like this PR because it makes terraform work again for us, after #7464 broke it) |
Revert back to using a nil state. The external usage of the state shoudl always check the Empty() method.
- Check for an empty state. If nothing is referenced from that state in the config, there's nothing to do here.
Verify that a remote state file is correctly initialized in the same manner as used by the `terraform remote config`
@glasser Don't worry, this PR is definitely intended to fix that issue. Just pushed a revised patch which should revert to the old behavior entirely, and added another test to keep it stable. |
Confirm that revised patch works for me too. |
LGTM |
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. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Reverted the change that caused 7509, and fix the original panic in the terraform provider itself.
Add another test to cover remote state initialization.
Fixes #7509