-
Notifications
You must be signed in to change notification settings - Fork 191
Description
Extension Version
2.37.7 (Release) and 2.38.2026021014 (Pre-release)
VS Code Version
Version: 1.109.4 (user setup)
Commit: c3a26841a84f20dfe0850d0a5a9bd01da4f003ea
Date: 2026-02-16T15:35:57.932Z
Electron: 39.3.0
ElectronBuildId: 13313481
Chromium: 142.0.7444.265
Node.js: 22.21.1
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.26200
Operating System
Windows 11 Business Version 25H2 OS build 26200.7840 Experience Windows Feature Experience Pack 1000.26100.291.0
Terraform Version
Terraform v1.12.2 on windows_amd64
Steps to Reproduce
- Create a new tmp.tf file, with following content
terraform {
required_providers {
grafana = {
source = "grafana/grafana"
version = "~> 4.25"
}
}
}
provider "grafana" {
alias = "cloud"
url = "https://example.grafana.net"
oncall_url = "https://oncall-prod-eu-west-0.grafana.net/oncall"
oncall_access_token = "123"
auth = "123"
}
resource "grafana_synthetic_monitoring_check_alerts" "healthcheck_a" {
provider = grafana.cloud
check_id = 123
alerts = [
{
name = "ProbeFailedExecutionsTooHigh"
period = "5m" # Alert if down for 5 minutes
threshold = 1.0 # 100% failure rate
runbook_url = "http://example.com/runbook" # Optional: Add runbook URL for handling alerts
}
]
}- Create another file, in another dir with this content
terraform {
required_providers {
grafana = {
source = "grafana/grafana"
version = "~> 4.25"
}
}
}
provider "grafana" {
alias = "cloud"
url = "https://example.grafana.net"
oncall_url = "https://oncall-prod-eu-west-0.grafana.net/oncall"
oncall_access_token = "123"
auth = "123"
}
resource "grafana_synthetic_monitoring_check_alerts" "healthcheck_a" {
provider = grafana.cloud
check_id = 123
lol= ziom
alerts {
name = "ProbeFailedExecutionsTooHigh"
period = "5m" # Alert if down for 5 minutes
threshold = 1.0 # 100% failure rate
runbook_url = "http://example.com/runbook" # Optional: Add runbook URL for handling alerts
}
}Expected Behavior
Both files show no error (as both pass correctly the terraform validate test)
Actual Behavior
First file reports error Too few blocks specified for "alerts": At least 1 block(s) are expected for "alerts" Terraform
Second file reports error Required attribute "alerts" not specified: An attribute named "alerts" is required here Terraform
Terraform Configuration
Project Structure
Gist
No response
Anything Else?
Seems like both formats are accepted by terraform, but both are required by Terraform VS Code plugin, so no matter which I choose, it will report an error
Workarounds
Just ignore the UI error, terraform command works perfectly
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