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

Extension shows a deprecation for an attribute but not the reason #1729

Open
1 task
glennsarti opened this issue Apr 2, 2024 · 2 comments
Open
1 task
Labels
enhancement New feature or request upstream/tf-core

Comments

@glennsarti
Copy link
Contributor

Extension Version

v2.29.5

VS Code Version

Version: 1.87.2 (Universal)
Commit: 863d2581ecda6849923a2118d93a088b0745d9d6
Date: 2024-03-08T15:21:31.043Z
Electron: 27.3.2
ElectronBuildId: 26836302
Chromium: 118.0.5993.159
Node.js: 18.17.1
V8: 11.8.172.18-electron.0
OS: Darwin arm64 22.6.0

Operating System

macOS 13.6.5

Terraform Version

Terraform v1.7.5 on darwin_arm64

Steps to Reproduce

In a new repro create a file with the following content

terraform {
  required_providers {
    tfe = {
      version = "~> 0.53.0"
    }
  }
}

data "tfe_organization" "something" {
  name = "something"
}

# Workspaces
resource "tfe_workspace" "plain-workspace" {
  name           = "something"
  organization   = data.tfe_organization.something.name
  tag_names      = ["cli", "tfcreated"]
  execution_mode = "remote"
}

Expected Behavior

It tells me the execution mode is deprecated and why

Actual Behavior

It tells me the execution mode is deprecated but no reason

image

There is most definitely a reason - Source

Terraform Configuration

No response

Project Structure

No response

Gist

No response

Anything Else?

No response

Workarounds

No response

References

No response

Help Wanted

  • I'm interested in contributing a fix myself

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
@glennsarti glennsarti added the bug Something isn't working label Apr 2, 2024
@glennsarti

This comment was marked as off-topic.

@dbanck
Copy link
Member

dbanck commented Apr 26, 2024

Hi @glennsarti! Thanks for the report!

I agree, that it would be helpful to show the deprecation message (and maybe even a quick fix) to a user. Currently, we don't have access to the deprecation message, because it's not part of the provider schema.
The language server relies entirely on the machine-readable provider schema, which tells it nothing more than that an attribute or a block is deprecated. It just contains a boolean flag: https://github.com/hashicorp/terraform-json/blob/8cba21aed5ce23c8d464e21d6c04d233ca3d50f6/schemas.go#L210-L211

Exposing the deprecation message will likely require changes to the provider framework/SDK and Terraform core.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request upstream/tf-core
Projects
None yet
Development

No branches or pull requests

2 participants