VladRassokhin / intellij-hcl

HCL language support for IntelliJ platform based IDEs
Apache License 2.0
244 stars 47 forks source link

Unresolved Reference With Standard Example #344

Open SJrX opened 3 years ago

SJrX commented 3 years ago

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

Prerequisites

Installation details

Terraform Configuration Files

resource "aws_acm_certificate" "example" {
  domain_name       = "example.com"
  validation_method = "DNS"
}

data "aws_route53_zone" "example" {
  name         = "example.com"
  private_zone = false
}

resource "aws_route53_record" "example" {
  for_each = {
    for dvo in aws_acm_certificate.example.domain_validation_options : dvo.domain_name => {
      name   = dvo.resource_record_name
      record = dvo.resource_record_value
      type   = dvo.resource_record_type
    }
  }

  allow_overwrite = true
  name            = each.value.name
  records         = [each.value.record]
  ttl             = 60
  type            = each.value.type
  zone_id         = data.aws_route53_zone.example.zone_id
}

Exception

n/a

Expected Behavior

No syntax errors

Actual Behavior

Syntax errors

Steps to Reproduce

  1. Paste that file (which comes from https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/acm_certificate_validation).
  2. Notice errors image
flyb1z0n commented 2 years ago

+1 faced with the same issue