Conversation
Codecov Report
|
alisdair
left a comment
There was a problem hiding this comment.
👍 with one theoretical concern about exiting without displaying diags. Yay for code deletion!
command/init.go
Outdated
| // Errors from the early loader are generally not as high-quality since | ||
| // it has less context to work with. | ||
| c.Ui.Error(strings.TrimSpace(errInitConfigError)) | ||
| } |
There was a problem hiding this comment.
If I'm reading this correctly, if the early loader has errors and the real loader doesn't, we'll print an error but no diagnostics and won't exit. This seems like a basically-impossible situation to be in, but maybe we should try to handle it somehow anyway? We did before, I think.
There was a problem hiding this comment.
This prints the error, but waits till the next step to return so we can customize the response based on whether both config loaders fail, or just the latter.
Having said that, I'm making a big assumption that the config loader will always produce an error if the earlyconfig produces an error, and just because that's how it's supposed to work doesn't mean that's how it will work.
I'm going to make a couple of small changes and re-request review, thanks for bringing this up!
|
@alisdair: I rolled back my changes to the logic flow in |
|
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. |
This PRs removes 012upgrade and the related upgrade code. I've left in the basic logic which detects when
earlyconfigsucceeds and regular config loading fails, which (stil)l suggests that terraform is dealing with 0.11-style syntax, but turned the warning into an error and added a message that suggests the user upgrade their syntax manually or use terraform 0.12 to runterraform init.