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

Mutliple errors/warnings showing for Azure resources that are perfectly valid for provider v3 #1871

Open
1 task
scott-doyland-burrows opened this issue Oct 31, 2024 · 1 comment
Labels
bug Something isn't working waiting-response

Comments

@scott-doyland-burrows
Copy link

Extension Version

v2.33.0

VS Code Version

Version: 1.94.0 (user setup)
Commit: d78a74bcdfad14d5d3b1b782f87255d802b57511
Date: 2024-10-02T13:08:12.626Z
Electron: 30.5.1
ElectronBuildId: 10262041
Chromium: 124.0.6367.243
Node.js: 20.16.0
V8: 12.4.254.20-electron.0
OS: Windows_NT x64 10.0.19045

Operating System

Window using WSL

Terraform Version

Terraform v1.9.8 on linux_amd64

Steps to Reproduce

I am using the azurerm provider and it is set as version 3.66.0 in the provider.tf file.

The extension is reporting that some of my valid terraform code is now invalid. I assume it is basing this on the fact that resources using provider v4 have different options, ie v4 is the new/latest provider.

Expected Behavior

Should the extension recognize I am using provider v3 and use that to determine if my code is correct.

Actual Behavior

image

image

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
@scott-doyland-burrows scott-doyland-burrows added the bug Something isn't working label Oct 31, 2024
@dbanck
Copy link
Member

dbanck commented Nov 14, 2024

Hi @scott-doyland-burrows,

Thanks for the report! By default the language server ships with the latest available provider schema, but if you have a local installation of the provider, this version will be preferred.

After running terraform init, I see that the correct version is being used.
CleanShot 2024-11-14 at 14 58 35@2x

If you see different behaviour in your project, it may be a bug. Does running terraform init solve the problem for you?

In case you want to learn more about how we handle provider schemes, we have an explainer here: https://github.com/hashicorp/terraform-ls/blob/main/docs/schema.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working waiting-response
Projects
None yet
Development

No branches or pull requests

2 participants