VladRassokhin / intellij-hcl

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

Syntax Error when using '.' (a dot) in environment variables #340

Closed aivrit closed 3 years ago

aivrit commented 3 years ago

Prerequisites

Installation details

IDE version GoLand 2021.1.3 Build #GO-211.7442.57, built on June 9, 2021 Runtime version: 11.0.11+9-b1341.57 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Linux 5.4.0-77-generic GC: ParNew, ConcurrentMarkSweep Memory: 1906M Cores: 8 Non-Bundled Plugins: org.intellij.plugins.hcl (0.7.10), org.toml.lang (0.2.147.3871-211), PythonCore (211.7442.45), idea.plugin.protoeditor (2.3.1) Current Desktop: ubuntu:GNOME

Terraform Configuration Files

job "proxymanager" {
  datacenters = [
    "dc1"]

  update {
    max_parallel = 3
    health_check = "checks"
    min_healthy_time = "10s"
    healthy_deadline = "5m"
    progress_deadline = "10m"
    auto_revert = true
    auto_promote = false
    canary = 1
    stagger = "30s"
  }

  group "proxymanager" {
    count = 1

    restart {
      attempts = 10
      interval = "1m"
      delay = "25s"
      mode = "delay"
    }

    # - app - #
    task "proxymanager" {
      driver = "docker"

      env {
        HATEAOS = "user.service.consul"
        TESTVAR_WITH.DOTS.TEST1 = "${attr.unique.network.ip-address}"
}

config {
  image = "weaveworksdemos/user:master-5e88df65"
  hostname = "user.service.consul"
  network_mode = "sockshop"
  port_map = {
    http = 80
  }
}

service {
  name = "user"
  tags = [
    "app",
    "user"]
  port = "http"
}

resources {
  cpu = 100
  # 100 Mhz
  memory = 256
  # 256MB
  network {
    mbits = 10
    port "http" {}
  }
}
} 
}
}

Exception

<block> or <property> expected, got '.'

Expected Behavior

Nomad has support for dots in environment variables, it should be accepted as valid syntax.

Actual Behavior

error: or expected, got '.'

Steps to Reproduce

Please list the steps required to reproduce the issue, for example: try to give an environment variable a name that includes '.', like in the hcl above