Open albuch opened 4 years ago
Help->About->Copy to Clipboard
): JetBrains Rider 2019.3.4
Settings->Plugins
): 0.7.7
terraform -v
) Terraform v0.12.24 provider.aws v2.57.0
This seems to be close to my issue as well (uploading the picture to show incorrect syntax highlighting).
Result:
Screenshots with sources 🤦 , is there a web service which converts them to text already? Moreover it's another issue
@albuch Seems it's unresolved due to ternary operator, works fine in case of
output "bucket" {
value= aws_s3_bucket.this_bucket[0]
}
I am expierencing a similar issue in a setup having
output "disk" {
value = var.allow_disk_source_change ? azurerm_managed_disk.disk_no_recreation[0] : azurerm_managed_disk.disk_force_recreation[0]
}
Where var.allow_disk_source_change
is a bool. I am then using disk.id
from the output which should always be defined. Terraform itself is not reporting anything but the plugin is reporting an error.
IDE Version: IntelliJ IDEA 2019.3.5 (Ultimate Edition) Build #IU-193.7288.26, built on May 6, 2020
intellij-hcl plugin version: 0.7.9
Terraform version: 0.12.25 provider.azurerm 2.10.0
If wanted I can create a separate Issue.
Looks like similar issue to mine:
resource "aws_eks_cluster" "main" {
name = "test"
role_arn = "role-abcd"
vpc_config {
subnet_ids = ["subnet-abcd"]
}
}
output "oidc_provider_url" {
value = aws_eks_cluster.main.identity[0].oidc[0].issuer
}
I'm getting Unresolved reference issuer
while terraform apply and plan work fine. I can report a separate issue.
IDE Version: IntelliJ IDEA 2020.2 (Ultimate Edition) Build #IU-202.6397.94, built on July 27, 2020
intellij-hcl plugin version: 0.7.10
Terraform version: v0.13.1 provider aws 3.4.0
I have a slightly different use case when I employ a proxy local for the terraform_remote_state data:
data "terraform_remote_state" "backend_infra" {
backend = "s3"
config = {
bucket = var.backend_bucket
key = var.backend_key
region = "eu-central-1"
}
}
locals {
backend_outputs = data.terraform_remote_state.backend_infra.outputs
deployment_stage = local.backend_outputs.deployment_stage
}
Wherever I use the proxy local (I do this for sake of brevity on multiple places) it gets highlighted with the same Unresolved reference error.
IDE: 2022.2.3 (Build #PY-222.4345.23, built on October 10, 2022) HCL Plugin: 222.4345.14 Terraform version: 0.13.5
FWIW, this issue got me thinking: https://github.com/VladRassokhin/intellij-hcl/issues/108#issuecomment-329997796
At the same time 'unresolved reference' doesn't highlight that code as error since 'terraform_remote_state' specially marked to contain dynamic properties.
It would be ideal to be able to somehow mark locals to contain dynamic properties
Installation details
Help->About->Copy to Clipboard
):2019.3.3 Ultimate
Settings->Plugins
)0.7.7
terraform -v
)Terraform v0.12.20, provider.aws v2.52.0
Terraform Configuration Files
Module output defined with a resource object in a module:
and then referenced a member of the modules output object:
Exception
Expected Behavior
Members of complex outputs (e.g. ressources) from an array should not be reported as unresolved.
Actual Behavior
terraform apply
properly works IDEA displays validation error "Unresolved reference