Closed StorageMatt closed 9 months ago
Hi @StorageMatt The validation (and pretty much all other features) is dependent on the version of Terraform and - especially in this case - versions of providers.
I was not able to reproduce this with the latest version of the AWS provider available (5.22.0
).
Therefore - can you please find the relevant required_providers
block with the aws
version constraint and share it with us? Also, can you check if you ran terraform init
to install the AWS provider and what version of the provider is installed based on that constraint (you can run terraform version
, it will contain installed provider versions as well).
Apologies for the very delayed response, I've been away from work for a while. Anyway, I've initialized again this morning and had a look and interestingly, VSC is flagging only the files in the .terragrunt-cache directory as being incorrect and when I mouse over, it's showing that it's using AWS provider v4.67.0. So fair enough that it's showing an error maybe, but I have initialized using the latest version of AWS provider (5.23.0) and all cache files confirm this. So any idea why the LS is using 4.67.0 in this context?
Thanks for those extra details.
Can you check what versions and constraints are being detected by the LS/extension in the panel?
Secondly, can you double check what LS version is being detected in the bottom bar?
Lastly, can you try reloading VS Code via the command palette?
Normally, changes in .terraform
(which includes installation of providers, as done by terraform init
) are detected automatically. If it's not then this would suggest a bug in the detection.
Marking this issue as stale due to inactivity over the last 30 days. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.
Thank you for understanding.
Closing this issue due to its staleness.
If the issue was automatically closed and you feel it should be reopened, we encourage creating a new one linking back to this one for added context.
Thank you!
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.
Language Server Version
I assume the latest
Terraform Version
Terraform v1.5.7 on darwin_arm64
Client Version
VSCode HashiCorp Terraform v2.28.2
Terraform Configuration
Steps to Reproduce
Just drop the above in VSCode with the latest version of Hashicorp Terraform and the syntax highlighter gets very grumpy - Required attribute "auto_enable" not specified: An attribute named "auto_enable" is required here
Expected Behavior
That it's completely cool with auto_enable_organization_members
Actual Behavior
It's not at all cool with auto_enable_organization_members and instead wants
auto_enable = xxx
which according to the docs is the deprecated style.Gist
No response
Workarounds
Ignore it.
References
No response
Help Wanted
Community Note