Skip to content

Contradicting errors reported for "grafana_synthetic_monitoring_check_alerts" resource #2192

@karol-gro

Description

@karol-gro

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

  1. 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
    }
  ]
}
  1. 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

Image

Second file reports error Required attribute "alerts" not specified: An attribute named "alerts" is required here Terraform

Image

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions