Same here. Considering that pulumi uses fully-fledged programming language and not some custom DSL (looking at you, terraform), there are many ways to keep it nice and clean. That is, you don’t have to scatter the conditionals everywhere in the code. If you want to go full OOP, you can even write a factory class that’s gonna generate the correct implementation based on some
env
argument.
c
creamy-nail-67991
11/16/2021, 2:24 PM
For us anything that is different is parametrised and placed in the configuration settings, so there is very little logic for env-branching.
There is however, a lot of conditional logic in our code to cover the configuration mutations.
No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.