-
Notifications
You must be signed in to change notification settings - Fork 187
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Extension Version
v2.36.1
VS Code Version
Hello,
"for_each" instruction in imports under Terraform make an Unexpected attribute error: An attribute named "for_each" is not expected here
Bug has appeared since version 2.35.0.
Ex:
import {
for_each = local.web_instances
to = aws_launch_template.web[each.key]
id = each.value[0]
}
Operating System
Ubuntu 22.04.5 LTS (WSL)
Terraform Version
Terraform v1.13.1 on linux_amd64
Steps to Reproduce
Upgrade to version v2.36.1
Use for_each instruction in import terraform structure
Expected Behavior
The for_each instruction must be able to work in an import under terraform.
Actual Behavior
Hello,
"for_each" instruction in imports under Terraform make an Unexpected attribute error: An attribute named "for_each" is not expected here
Bug has appeared since version 2.35.0.
Ex:
import {
for_each = local.web_instances
to = aws_launch_template.web[each.key]
id = each.value[0]
}
Terraform Configuration
Project Structure
Gist
No response
Anything Else?
No response
Workarounds
No response
References
No response
Help Wanted
- I'm interested in contributing a fix myself
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
AlexanderRijnbeek, soockee, aspen-po, m-zeb, SerhiiCherniavskyi and 10 more
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working