I tend to wrap all the infra in classes, init all the infra in the constructor and then have readonly fields to pass things between different stacks/classes/pieces of infra
p
prehistoric-london-9917
07/22/2021, 11:47 PM
If that works 👍 I’m attaching what is (perhaps) a cleaner implementation.
config.get()
will return
undefined
if that key isn’t there, so the
|| "";
is probably unnecessary. Undefined also lets you use the ternary operator in line 14 of this snippet.
This lets the
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.