How to wrap terraform registry module under private repository in order to perform customization

Our expectations:

  • for each terraform registry used module create a specific repository on our private project;
  • use these repositories as module sources in the main infra configuration;
  • to have the possibility to customize the registry module under the private repository in regards to variables and outputs.

We tried creating a main file under each corresponding repo containing module and source to that module registry. That didn’t help getting errors with argument not declared.

We are doing it wrong for certain. Any help would be highly appreciated.