Issue with moving kubernetes resources into child module

Prerequisits

  1. "minikube" need to be installed and run: minikube start

Steps to reproduce

  1. Clone this repository: git clone https://github.com/lepskiy/kube-module-issue
  2. Got inside the folder: cd kube-module-issue
  3. Run terraform init
  4. Run terraform plan
  5. Run terraform apply
  6. Switch to "module" banch: git checkout module
  7. Run terraform init
  8. Run terraform plan

Expected Behavior

Plan should be shown.

Actual Behavior

The error is shown: