Open bedge opened 3 years ago
Above does show up as an "IDE error" in Intellij UI, with accompanying suggestion to report here.
Note that switching to another file, the plugin works correctly, ie: all occurrences are highlighted.
This is repeatable, switch to another file, works, back to the attached data.tf
, stack trace.
.tf files are not supported on upload, so here's the full file text
data "aws_caller_identity" "main" {}
data "aws_kms_key" "s3_kms_key" {
key_id = "alias/${local.org_env_code}-s3"
}
data "aws_route53_zone" "zone" {
name = local.zone_name
}
data "aws_sns_topic" "cloudwatch_topic" {
name = "${var.org_env}-alerts"
}
data "aws_subnet_ids" "public" {
vpc_id = data.aws_vpc.main.id
filter {
name = "tag:Name"
values = ["${local.org_env_code}-public"]
}
}
data "aws_subnet_ids" "private" {
vpc_id = data.aws_vpc.main.id
filter {
name = "tag:Name"
values = ["${local.org_env_code}-private"]
}
}
data "aws_vpc" "main" {
filter {
name = "tag:Name"
values = [local.org_env_code]
}
}
data "aws_security_group" "operations_sg" {
name = "${local.operations_name}-ALB"
}
Restarting Intellij clears the stack trace behavior. Back to only highlighting the cursor instance of string.
It seems that .tf
file is not perfectly supported by IntelliJ IDEA?
Do you install any other plugins for terraform files?
It seems that
.tf
file is not perfectly supported by IntelliJ IDEA? Do you install any other plugins for terraform files?
Yes, there's a terraform plugin: https://plugins.jetbrains.com/plugin/7808-hashicorp-terraform--hcl-language-support
Here's an example:
Both
local
andname
were selected, and are not highlighted in the subsequent occurrences.While I can highlight the other occurrences manually, they are seen as different values as they are in a different color:
FWIW, these are
.tf
terraform files.I'm using version 2.2.0 of the plugin on Intellij:
Here's a stack trace I saw in the idea.log when trying to highlight an unselected word that the cursor was on:
Tried again with the word selected and looks like the identical trace.
Note: these were the same words that did work, at least to highlight the one instance in the screenshot.
The only action I took between the included screenshots and the stack traces was popping in and out of settings to get version data for this ticket.
Note also that the strings are no longer being highlighted at all. This happens periodically as well. I thought it was a file type dependency, but that appears not to be the case as the screenshots I just took at least highlighted something.
Please let me know if there's any other data I can provide