Members of complex object outputs of modules are reported as unresolved if output referenzes object from array
See original GitHub issueInstallation details
- IDE version (
Help->About->Copy to Clipboard
):2019.3.3 Ultimate
- intellij-hcl plugin version (
Settings->Plugins
)0.7.7
- Terraform version (
terraform -v
)Terraform v0.12.20, provider.aws v2.52.0
Terraform Configuration Files
Module output defined with a resource object in a module:
variable "enabled" {
default = true
}
resource "aws_s3_bucket" {
count = var.enabled ? 1 : 0
...
}
output "bucket" {
value= var.enabled ? aws_s3_bucket.this_bucket[0] : null
}
and then referenced a member of the modules output object:
module "test" {}
local {
test= module.test.bucket.bucket
}
Exception
Unresolved reference bucket
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 <attribute>”.
This seems to have already been partially fixed with 0.7.2 (see #213) however it is still happening for this case with 0.7.7.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Data Structures: Objects and Arrays - Eloquent JavaScript
Many types of information require more than one atom, though. Objects allow us to group values—including other objects—to build more complex structures.
Read more >rollup.js
rollup function receives an input options object as parameter and returns a Promise that resolves to a bundle object with various properties and...
Read more >How a load module is created - IBM
An output load module is composed of all input object decks and input load modules processed by the linkage editor. The control dictionaries...
Read more >Groovy Language Documentation
Boolean expressions; Collections and Arrays; Matchers; Iterators and Enumerations; Maps; Strings; Numbers; Object References; Customizing the truth with ...
Read more >OMNeT++ - Simulation Manual - Index of - omnetpp.org
In OMNeT++, any module which would be too complex as a single entity can be ... There are two basic constructs in NED...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@albuch Seems it’s unresolved due to ternary operator, works fine in case of
I have a slightly different use case when I employ a proxy local for the terraform_remote_state data:
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
It would be ideal to be able to somehow mark locals to contain dynamic properties