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
Version: 1.74.3
Commit: 97dec172d3256f8ca4bfb2143f3f76b503ca0534
Date: 2023-01-09T16:57:40.428Z
Electron: 19.1.8
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Linux x64 5.14.0-1055-oem
Sandboxed: No
Operating System
Ubuntu 20.04.5 LTS
Terraform Version
Terraform v1.3.0 on linux_amd64
Steps To Reproduce
Go to main.tf
Add a azapi_resource
Under body.properties.criteria, add odata.type
Notice that VSCode still complains odata.type is required, but no definition was found even though the property is there.
Include any relevant Terraform configuration or project structure:
resource"azapi_resource""exception_alerts_windows" {
type="Microsoft.Insights/metricAlerts@2018-03-01"name="${var.metric_alerts_prefix}-${var.project}-${var.environment}-exception-alerts-windows"location=var.metric_alerts_locationparent_id=azurerm_resource_group.resource_group.idbody=jsonencode({
properties = {
description ="Action will be triggered when there is an exception in function app"
severity =0// Critical (from 0 as Critical to 4 as Verbose)
enabled =true
scopes = [azurerm_application_insights.application_insights_windows.id]
evaluationFrequency ="PT1M"
windowSize ="PT5M"
criteria = {
odata.type ="Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria"
allOf = [
{
criterionType ="StaticThresholdCriterion"
metricName ="exceptions/server"
metricNamespace ="microsoft.insights/components"
name ="Metric1"
operator ="GreaterThanOrEqual"
threshold =1
timeAggregation ="Count"
}
]
}
autoMitigate =false
targetResourceRegion = azurerm_resource_group.resource_group.location
targetResourceType ="microsoft.insights/components"
actions = [
{
actionGroupId = azurerm_monitor_action_group.action_group.id
webHookProperties = {}
}
]
}
})
# etc...
Expected Behavior
VSCode should not complain about missing odata.type
Actual Behavior
VSCode complaint that odata.type is missing.
Additional context
I'm running Terraform from a Docker container.
I tried with few different way to denote odata.type, none of them fix the issue:
Raw string: odata.type
With brackets: (odata.type)
With quotes: "odata.type"
If I declare odata.typewithout quote as shown in the example above, I will not be able to deploy due to an error: A managed resource "odata" "type" has not been declared in the root module.
The text was updated successfully, but these errors were encountered:
Versions
This bug is reproducible in:
Extension
Language Server
VS Code
Operating System
Terraform Version
Steps To Reproduce
main.tf
azapi_resource
body.properties.criteria
, addodata.type
odata.type
is required, but no definition was found even though the property is there.Include any relevant Terraform configuration or project structure:
Expected Behavior
VSCode should not complain about missing
odata.type
Actual Behavior
VSCode complaint that
odata.type
is missing.Additional context
odata.type
, none of them fix the issue:odata.type
without quote as shown in the example above, I will not be able to deploy due to an error:A managed resource "odata" "type" has not been declared in the root module.
The text was updated successfully, but these errors were encountered: