VladRassokhin/intellij-hcl

Validation errors: Serverless loadbalancer produces validation errors

mccare opened this issue · 1 comments

Thank you for opening an issue.
In this template paragraph text could be removed, however please retain headers.

Prerequisites

  • Ensure you have latest version of plugin installed
  • Search for possible issue duplicates

Installation details

  • IDE version (Help->About->Copy to Clipboard)
  • intellij-hcl plugin version (Settings->Plugins)
  • Terraform version (terraform -v)

IDE

WebStorm 2021.1.3
Build #WS-211.7628.25, built on June 30, 2021
Runtime version: 11.0.11+9-b1341.60 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 11.4
GC: ParNew, ConcurrentMarkSweep
Memory: 5891M
Cores: 16
Registry: eslint.additional.file.extensions=svelte
Non-Bundled Plugins: com.khmelyuk.multirun (1.12), org.intellij.plugins.hcl (0.7.10), org.jetbrains.plugins.go-template (211.6693.44), com.google.gct.core (21.6.1), dev.blachut.svelte.lang (0.19.0), com.intellij.lang.jsgraphql (2.9.1)

Terraform

1.0.1

Terraform Configuration Files

resource "google_compute_region_network_endpoint_group" "xxx_neg" {
	name                  = "xxx"
	network_endpoint_type = "SERVERLESS"
	region                = "us-west1"
	cloud_run {
		service = data.google_cloud_run_service.service.name
	}
}

resource "google_compute_backend_service" "xxx_backend" {
	name = "xxx-backend"
	protocol = "HTTP"
	port_name = "http"
	timeout_sec = 30
	backend {
		group = google_compute_region_network_endpoint_group.xxx_neg.id
	}
}

Expected Behavior

The syntax is valid

Actual Behavior

  • Reports: missing required health_checks in the google_compute_backend_service
  • Reports: Unkonw block cloud_run in google_compute_region_network_endpoint_group

Steps to Reproduce

Just add the hcl to a project and see the validation errors.

  • serverless has no required health_check
  • cloud_run was added to LB setup end of 2020

Fixed in 0.7.11