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

Mis-diagnosed terraform_remote_state datasource #1575

Closed
radeksimko opened this issue Oct 5, 2023 · 5 comments
Closed

Mis-diagnosed terraform_remote_state datasource #1575

radeksimko opened this issue Oct 5, 2023 · 5 comments
Assignees
Labels
bug Something isn't working diagnostics

Comments

@radeksimko
Copy link
Member

radeksimko commented Oct 5, 2023

Another example with terraform_remote_state datasource if it's helpful:

image

Originally posted by @brettcurtis in #1573 (comment)


data "terraform_remote_state" "foo" {
  backend = "gcs"
  config = {
    bucket = "value"
  }

  workspace = "foo"
}
@radeksimko radeksimko added bug Something isn't working diagnostics labels Oct 5, 2023
@radeksimko radeksimko self-assigned this Oct 5, 2023
@radeksimko
Copy link
Member Author

This appears to be related to how we assemble the dependent schema for terraform_remote_state. I managed to find a snippet which does not fail the validation:

data "terraform_remote_state" "foo" {
  backend   = ""
  provider  = terraform
  workspace = "foo"
}

@radeksimko
Copy link
Member Author

This is related to hashicorp/terraform-schema#251 - it appears we did not account for all edge cases there.

@radeksimko
Copy link
Member Author

I found a solution in hashicorp/terraform-schema#272 which is now pending review.

I will post updates here when we merge it and release it (hopefully soon).

@radeksimko
Copy link
Member Author

A new version 2.28.1 was just released. This fixes the reported bug. The update should appear automatically in VS Code.

Thank you for the the report @brettcurtis


In case you experience any different validation related bug, please do let us know through a new issue.

Copy link

github-actions bot commented Nov 6, 2023

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working diagnostics
Projects
None yet
Development

No branches or pull requests

1 participant