This message was deleted.
# general
s
This message was deleted.
s
Plain old Python packages are one way to solve this problem. In addition, if your org is large and uses a multitude of languages, multi-language components might be a good fit for your problem: https://www.pulumi.com/blog/pulumiup-pulumi-packages-multi-language-components/
b
Yeah! i'm thinking in Python packages but i cant figure out a good practice to make it. Have you any example?
i want to use packages and still using the Pulumi.yaml to set the values. I dont know if the best way is using packages as clases like this (fast typed) example:
s
You want to use Pulumi.yaml to pass values to your Python packages? Why not just use regular code?
b
Yes i want to pass values with Pulumi.yaml, what do you mean with regular code??
@stocky-restaurant-98004
s
Well, if you want to pass a value to a Python module, you don't have to use Pulumi.yaml - you can use any way you like to grab the value.
b
Yes! i know that its a better practice, i'll work on it. Now i'm looking for use ComponentResource, is it a better aproach for this module oriented architecture?
s
I'm not totally sure I understand what you're asking, but I would recommend creating a class that encapsulates some major component of the infra you want to modularize. The values should be passed to the module directly via code if possible. I wouldn't recommend, e.g., a module taking a config value directly from an external YAML file.
🙏 1