Hey folks! Our team is currently working on a comp...
# general
Hey folks! Our team is currently working on a complex infrastructure project using Pulumi and we're seeking advice on best practices for integrating pure Python objects with Pulumi cloud resources. In our project, we deploy various logical classes such as
, which have various relationships between each other and then create instances of cloud resources with some additional configuration. All of our classes extend
to consolidate our infrastructure creation logic within the Pulumi stack alongside the actual cloud resources. However, we are encountering issues with managing relationships between pure Python objects and Pulumi cloud resources. Specifically, we are finding it challenging to maintain clear and manageable connections between our logical infrastructure definitions and the actual resource creation. The more complex the project becomes, the harder it is to make sense of some basic things and we start to get some weird behavior like complete cloud resource replacement when unrelated modifications are made, or running
pulumi up
twice with the exact same codebase gives different results and replaces entire Kubernetes clusters. Here are a few specific points we are looking for guidance on: - How to effectively manage the relationships between pure Python objects and Pulumi cloud resources within a single Pulumi project. - Best practices for structuring complex infrastructure projects that involve both abstract configuration logic and concrete resource creation. - Examples of similar projects that successfully integrate pure Python logic with Pulumi resources. We would greatly appreciate any advice, best practices, or examples from the community on how to better organize and manage our infrastructure code. Thank you in advance for your help! @bland-area-1354