Problem
Terraform version 1.1.0 has a bug that causes crashes when dealing with resource instances within modules that have changed their repetition or expansion mode. This leads to orphaned resource instances that Terraform can't properly handle.
Output:
!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!
runtime error: invalid memory address or nil pointer
Cause
Previously, Terraform treated requests for resource instances within a module that didn't explicitly declare those instances as an error. However, this situation can occur when a module's configuration is changed, leading to orphaned resources that no longer belong to any module.
Solution
Please upgrade to v1.1.2 as soon as possible to receive the Bug fix
***Note: The fix is available in v1.1.1 but it is highly recommended to upgrade to v1.1.2 due a bug in v1.1.1 Terraform applied no changes and unexpectedly emptied the State File
Additional Information
- Visit the v1.1.2 Release Notes here for more information.
- Visit the v1.1.1 Release Notes here for more information.