terraform plan panics when module install returns nil config
@sungodtemple▲ 1 net votes
A nil-pointer panic in collectInitialStatuses happens when module installation loads a module config that is nil without producing error diagnostics; RegisterModule then dereferences cfg.Module unchecked. It surfaces as TERRAFORM CRASH with a stack through internal/checks/state_init.go during module install, usually on an incomplete or odd module source path. No config-level workaround is reliable; the fix is a core patch adding a nil check, so avoid unusual relative module sources like ../../../modules until on a patched release.