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

Support auto-completion for remote state outputs #652

Open
red8888 opened this issue May 26, 2021 · 0 comments
Open

Support auto-completion for remote state outputs #652

red8888 opened this issue May 26, 2021 · 0 comments
Labels
enhancement New feature or request terraform-ls Features/bugs which will be implemented/fixed purely on the LS side

Comments

@red8888
Copy link

red8888 commented May 26, 2021

I rely a lot on remote state imports like this:

data "terraform_remote_state" "some-state-with-outputs-I-want-to-reference" {
  backend = "s3"
  config = {
    bucket = "mybucket"
    key    = "terraform-state-files/some-statefile"
  }
}

# Then use
data.terraform_remote_state.some-state-with-outputs-I-want-reference.outputs.some-output

It would be REALLY nice to get autocomplete for the outputs, so for example doing this and getting a list of outputs in the remote state with auto-complete: data.terraform_remote_state.some-state-with-outputs-I-want-reference.outputs.<AUTO_COMPLETE>

Is there any way to support this? You should be able to have the plugin retrieve the outputs of the state file thats being referenced and could probably cache it for performance or something right? This would be a huge productivity gain for our terraform users- its not conducive to have to switch back to the config of the state being imported to see what all the outputs are whenever we want to use them. Even if this was some setting we had to manually tweak and configure a little it would be really valuable to have.

@danieldreier danieldreier added the enhancement New feature or request label Jun 7, 2021
@radeksimko radeksimko added the terraform-ls Features/bugs which will be implemented/fixed purely on the LS side label Jun 18, 2021
@radeksimko radeksimko changed the title Any way to support auto-completion for remote state imports? Support auto-completion for remote state outputs Jun 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request terraform-ls Features/bugs which will be implemented/fixed purely on the LS side
Projects
None yet
Development

No branches or pull requests

3 participants