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

earlydecoder: Decode unknown modules & provider requirements #108

Open
radeksimko opened this issue May 3, 2022 · 0 comments
Open

earlydecoder: Decode unknown modules & provider requirements #108

radeksimko opened this issue May 3, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@radeksimko
Copy link
Member

Currently we decode all module calls into a map, where the key is the module reference name and ignore any module calls which do not have a reference name + override modules of the same name.

module "" {
  source = ""
}

module "" {
  source = ""
}

Similarly we decode required providers into a map, keyed off provider local name and override any requirements with the same name.

terraform {
  required_providers {
    name = {
      source = ""
    }
    name = {
      source = ""
    }
  }
}

Map of course makes lookups much easier, but it makes it practically impossible to track unknown modules and provide some IntelliSense within those.

For module calls in particular map is a reasonable structure for hashicorp/terraform-ls#598 and hashicorp/terraform-ls#725 but unnamed modules may also be helpful to parse in the context of hashicorp/terraform-ls#869

Similarly hashicorp/terraform-ls#871 may benefit from decoded requirements of the same name.

Originally posted by @radeksimko in #106 (comment)

@radeksimko radeksimko added the enhancement New feature or request label May 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant