Hi, this is probably a silly question, but I’m having a very hard time trying to figure this out. I assume it has something to do with versions, the version of code I’m writing in and the version being used to check the syntax with.
Using VS Code with the latest HashiCorp Terraform extension, my versions.tf file states azurerm of version = “>=5.0.0”. I’ve triple checked the syntax on the documentation site Terraform Registry and have successfully initialised and run the code, deploying the Azure resources as expected.
So, why does VS Code indicate there are problems with the code?
For example, ‘Unexpected block: Blocks of type “service_endpoint” are not expected here’ is expected within azurerm_subnet in v5.0.0 Terraform Registry
A service_endpoint block supports the following:
-
service- (Required) The name of the Service endpoint to associate with the subnet. Possible values areMicrosoft.AzureActiveDirectory,Microsoft.AzureCosmosDB,Microsoft.CognitiveService,Microsoft.ContainerRegistry,Microsoft.EventHub,Microsoft.KeyVault,Microsoft.ServiceBus,Microsoft.Sql,Microsoft.Storage,Microsoft.Storage.Global, andMicrosoft.Web. -
network_identifier- (Optional) The ARM resource ID of the network identifier to associate with the service endpoint.
Thanks.
