Skip to content
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/schema: Make schema storage version-aware #243

Merged
merged 2 commits into from
Jul 22, 2020

Conversation

radeksimko
Copy link
Member

User impact

This doesn't yet fully implement 0.13 support nor does it deal with provider aliasing, but at least provides backward-compatible functionality for 0.12-style configs in 0.13 where provider sources aren't declared explicitly.

Before

Screenshot 2020-07-22 at 12 33 41

Screenshot 2020-07-22 at 12 35 57

After

Screenshot 2020-07-22 at 12 34 58

Screenshot 2020-07-22 at 12 35 15

Implementation details

The new internal/terraform/addrs package is mostly just a copy of these two files:
https://github.com/hashicorp/terraform/blob/master/addrs/provider.go
https://github.com/hashicorp/terraform/blob/master/addrs/provider_test.go

I just omitted functions which LS doesn't need (yet) and changed error handling from tfdiags to simpler multierror.

I intentionally didn't copy the whole package yet, but it may come down it as it's likely one of the ways of resolving #36 reliably.

@radeksimko radeksimko added bug Something isn't working terraform/0.13 labels Jul 22, 2020
@radeksimko radeksimko requested a review from a team July 22, 2020 11:37
@radeksimko radeksimko force-pushed the b-version-aware-schema-storage branch 4 times, most recently from f683a6b to 368c43d Compare July 22, 2020 14:05
@radeksimko radeksimko force-pushed the b-version-aware-schema-storage branch from 368c43d to bf0541a Compare July 22, 2020 14:07
@radeksimko radeksimko merged commit 2347f8d into master Jul 22, 2020
@radeksimko radeksimko deleted the b-version-aware-schema-storage branch July 22, 2020 15:03
@ghost
Copy link

ghost commented Aug 21, 2020

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 context necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Aug 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working terraform/0.13
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants