Hello! I'm trying to learn about how Pulumi intera...
# python
g
Hello! I'm trying to learn about how Pulumi interacts with package tooling in Python. It seems like you can set up your own virtual environment with whatever dependencies you like, but the main script always lives in a file called
__main__.py
that lives in the current directory. I try to keep the main package dir tidy with no Python files in it to avoid ambiguous imports, so I'd like to put it into a module like
myapp.deployment.pulumi_main
or similar. I have a few separate questions about this: • How does Pulumi figure out exactly where to read the code from? ◦ Is it hard-coded? ◦ Is changing it possible? • Are there best practices for larger projects around how to organize code? For example, should I be putting my Pulumi code into a different Git repo from my application?
d
You can use the
main
setting in Pulumi.yaml to specify a directory, but it'll always load with
__main__.py
in that directory
g
@dry-keyboard-94795 thanks for the hint! I feel like I'm going to feel very silly when this is answered, but where is the documentation for that configuration key?
g
Thanks, as expected I feel silly 🙂 . my eyes glazed right over that.
d
Tbh, I also struggle to find that page, what with Pulumi Yaml being a thing