https://pulumi.com logo
Title
s

steep-beach-52652

11/17/2021, 2:54 PM
Hello can we place python code in multiple files? pulumi up is just reading the _main___ only
p

prehistoric-activity-61023

11/17/2021, 3:10 PM
yes
nothing prevents you from importing additional modules in your code
__main__.py
is just an entrypoint
s

steep-beach-52652

11/17/2021, 3:11 PM
so we need to import the files inside main?
p

prehistoric-activity-61023

11/17/2021, 3:17 PM
yep
just treat this as a normal python project
have you checked official pulumi examples?
I think there should be sth illustrating that
__main__.py
imports
iam
and
vpc
(as well as
utils
that contains helper function)
s

steep-beach-52652

11/17/2021, 3:22 PM
thanks
@prehistoric-activity-61023 do you know how to pull private image from private docker registry to ECS in pulumi
p

purple-plumber-90981

11/17/2021, 11:58 PM
note: you can repoint
pulumi up
to use a file other than
__main__.py
in Pulumi.yaml config, if that is of any help, but it still has only one entrypoint, from which you must import any other modules