question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

HCL plugin is broken with Intellij IDEA 2021.2

See original GitHub issue

Thank you for opening an issue.

Prerequisites

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

Installation details

  • IDE version (Help->About->Copy to Clipboard)
IntelliJ IDEA 2021.2 (Ultimate Edition)
Build #IU-212.4746.92, built on July 27, 2021
Licensed to YOOI / Xavier Fournet
You have a perpetual fallback license for this version.
Subscription is active until January 5, 2023.
Runtime version: 11.0.11+9-b1504.13 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 10 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 750M
Cores: 8
Registry: nodejs.console.use.terminal=false
Non-Bundled Plugins: com.intellij.ideolog (203.0.27.0), org.intellij.plugins.hcl (0.7.10), com.intellij.plugin.adernov.powershell (2.0.7), Pythonid (212.4746.92), aws.toolkit (1.29-212), zielu.gittoolbox (212.6.6), org.intellij.scala (2021.2.15)
Kotlin: 212-1.5.10-release-IJ4746.92
  • intellij-hcl plugin version (Settings->Plugins) 0.7.10

  • Terraform version (terraform -v)

Terraform v1.0.3
on windows_amd64
+ provider registry.terraform.io/hashicorp/aws v3.51.0

Terraform Configuration Files

terraform {
  required_version = "1.0.3"

  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "3.51.0"
    }
  }
}

resource "aws_s3_bucket" "this" {
  bucket = "hcl-plugin-is-broken"
  force_destroy = true

  versioning {
    enabled = true
  }

  server_side_encryption_configuration {
    rule {
      apply_server_side_encryption_by_default {
        sse_algorithm = "AES256"
      }
    }
  }
}

data "aws_iam_policy_document" "this" {
  statement {
    sid = "AllowSSLRequestsOnly"
    effect = "Deny"
    principals {
      type = "*"
      identifiers = ["*"]
    }
    actions = ["s3:*"]
    resources = [
      aws_s3_bucket.this.arn,
      "${aws_s3_bucket.this.arn}/*"
    ]
    condition {
      test = "Bool"
      variable = "aws:SecureTransport"
      values = [false]
    }
  }
}

resource "aws_s3_bucket_policy" "this" {
  bucket = aws_s3_bucket.this.id
  policy = data.aws_iam_policy_document.this.json
}

Expected Behavior

File is valid, no warning or errors should be reported by the IDE. It was working correctly with previous IDEA version

Actual Behavior

  • All resource attribute are in error
  • All resource sub blocks are in warning
  • No autocompletion Screenshot 2021-07-27 225052

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. Create a main.tf file in IDEA with the content above
  2. See the warning and errors
  3. See completion is not working

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:74
  • Comments:27 (2 by maintainers)

github_iconTop GitHub Comments

34reactions
sergei-ivanovcommented, Aug 17, 2021

I opted for a simple way out: I rolled my IntelliJ IDEA back to 2021.1. It was a bit of a hassle, but working Terraform plugin is more important to me than any new features in 2021.2. Lack of commitment on the part of JetBrains is really disappointing here. If they don’t have resources to support the plugin, they should offer the stewardship to HashiCorp and give the source code back to the community.

16reactions
rajaie-sgcommented, Aug 24, 2021

I emailed JetBrains support asking about the plugin and got this response

Responsible developer is working on the compatibility issue with the latest IntelliJ IDE release. We’ll release a new version of the plug-in in a few weeks. Sorry for the inconvenience.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Terraform and HCL - IntelliJ IDEs Plugin - JetBrains Marketplace
Adds support for HashiCorp Configuration Language (HCL) and HashiCorp Interpolation Language (HIL), as well as their combination used in Terraform ...
Read more >
Terraform autocomplete (*.tf) broken in 2021.2 EAP : PY-49332
Since 2021.2 EAP, the Terraform autocomplete stopped working (default plugin from jetbrains). I can only see the global identifiers (count, lifecycle, ...
Read more >
After installing 2021.2 getting plugin errors " depends on failed ...
The same happened to me: I got offered the upgrade from 2021.1 to 2021.2 today, installed it, and bam, all EE plugins are...
Read more >
Advanced Java Folding plugin crashes IDE in 2021.2 EAP
An exception is thrown while the IDE is initializing, and the process dies. Plugin 'com.intellij.bigdecimal-folding' failed to initialize and will be disabled.
Read more >
Terraform: cannot locate module locally: unknown reason
[1] https://plugins.jetbrains.com/plugin/7808-terraform-and-hcl ... I am facing the same issue PyCharm version 2021.2.3, Terraform and HCL plugin version ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found