Loading...
Loading...
### Terraform Version ```shell Terraform v1.4.6 ``` ### Use Cases When using a for_each and there is a missing or invalid index, Terraform should print out the actual value that's causing the issue. Instead the error is ``` Error: Invalid index │ on ../modules/users/usersModule.tf line 117, in resource "okta_group_memberships" "mygroup": │ 117: users = [for username in each.value.users: okta_user.users[username].id ] │ │ okta_user.user is object with 727 attributes │ The given key does not identify an element in this collection value. ``` ### Attempted Solutions Basically I need to manually find the missing key. My terraform project has 727 values for this resource... ### Proposal It would be nice to see the actual resource ID, eg The given key "john123" does not identify an element in this collection value. ### References _No response_
Click on a version to see all relevant bugs
Terraform Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.