Couldn't find this info in the docs.. In Python, my
simply imports other modules and the project contains other modules still. However, Pulumi seems to require all the
to import modules, or else Pulumi doesn't import them.Is this correct?
I need to explicitly import all modules and packages in each package's
If so, is there a better / more standardized way?
6 months ago
There is nothing special about Pulumi and the import process. Once you import main.py, it is just Python code at that point that follows standard rules for imports. I use imports regularly and my init.py files are all empty. I suspect there is something about your project setup. I would recommend the use of a tool like
to set up your project -- it tends to put everything in the correct place and generally takes care of most people's import issues.