You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It should not be marked red or as incorrect. The code works perfectly when executed.
Actual Behavior
It is marked in red with the following message:
Unexpected attribute: An attribute named "enable_accelerated_networking" is not expected here
Terraform Configuration
No response
Project Structure
No response
Gist
No response
Anything Else?
No response
Workarounds
Ignore the message.
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
The text was updated successfully, but these errors were encountered:
Which version of the Azure provider are you using? I couldn't find anything in the v4 docs about the mentioned enable_accelerated_networking attribute.
Thanks for the clarification! 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, the correct version will be used.
If you see different behaviour in your project, it may be a bug. Does running terraform init solve the problem for you?
Ok, now I understand. The machine I'm using VSCode from doesn't have terraform installed, so it always uses latest which I see uses "accelerated_networking_enabled" instead of "enable_accelerated_networking" (valid in 3.70), so on this machine it will always show me the error message.
Thanks a lot for the help!
Extension Version
v2.33.0
VS Code Version
Version: 1.94.2 (user setup)
Commit: 384ff7382de624fb94dbaf6da11977bba1ecd427
Date: 2024-10-09T16:08:44.566Z
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.22631
Operating System
Windows 11 Enterprise 23H2 (Build 22631.4317)
Terraform Version
Terraform v1.7.4
Steps to Reproduce
When you write thist code, the attribute "enable_accelerated_networking" is detected as error incorrectly.
resource "azurerm_network_interface" "avd_vm_nic" {
count = length(var.machine_names)
name = "${var.machine_names[count.index]}-nic"
resource_group_name = var.rg
location = var.resource_group_location
enable_accelerated_networking = true
ip_configuration {
name = "nic${var.machine_names[count.index]}_config"
subnet_id = "${var.subnet_id}"
private_ip_address_allocation = "Dynamic"
}
}
Expected Behavior
It should not be marked red or as incorrect. The code works perfectly when executed.
Actual Behavior
It is marked in red with the following message:
Unexpected attribute: An attribute named "enable_accelerated_networking" is not expected here
Terraform Configuration
No response
Project Structure
No response
Gist
No response
Anything Else?
No response
Workarounds
Ignore the message.
References
No response
Help Wanted
Community Note
The text was updated successfully, but these errors were encountered: