Add support for dynamic blocks
luis-guimaraes-exoawk opened this issue · 0 comments
luis-guimaraes-exoawk commented
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 2022.1.1 (Ultimate Edition)
Build #IU-221.5591.52, built on May 10, 2022
Runtime version: 11.0.14.1+1-b2043.45 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 12
Non-Bundled Plugins:
org.rust.lang (0.4.170.4627-221)
org.jetbrains.plugins.go-template (221.5591.19)
org.intellij.plugins.hcl (221.5591.19)
mobi.hsz.idea.gitignore (4.4.0)
com.intellij.kubernetes (221.5591.58)
Kotlin: 221-1.6.21-release-337-IJ5591.52
Current Desktop: KDE
- intellij-hcl plugin version (
Settings->Plugins
)
221.5591.19
- Terraform version (
terraform -v
)
Terraform v1.2.0
on linux_amd64
Terraform Configuration Files
resource "aws_db_parameter_group" "demo" {
name = "mysql-demo"
family = "mysql5.7"
dynamic "parameter" {
for_each = local.rds.conditions.db_parameters
content {
name = each.value.name
value = each.value.value
}
}
}
Exception
The "each" object can be used only in "resource"/"data"/"module" blocks, and only when the "for_each" argument is set
Expected Behavior
It should recognize the values correctly
Actual Behavior
It doesn't recognize valid values
Steps to Reproduce
- Create a
dynamic
block with afor_each
and check that values are not recognized inside thecontent
block