https://pulumi.com logo
#general
Title
# general
b

bright-orange-69401

01/04/2020, 6:25 AM
I'm looking for guidelines regarding how to work with
serverless
and
pulumi
side by side Serverless does a good job at providing code boilerplate and packaging functions but Pulumi far outclasses it when it comes to infrastructure provisioning. What's the best way to make those two work together ? Should I just add a "Managed By" tag to my resources depending on wether they were deployed by Serverless or Pulumi ? How do I automatically import in my Pulumi stack resources that were created by Serverless ? Is it better to not use Serverless's deployment features altogether ?
m

miniature-musician-31262

01/04/2020, 4:07 PM
Using the two together seems like it’d just make for extra work. I’ve used a little Serverless, but not a ton, so I’m curious where Serverless provides a better experience than Pulumi for you (assuming it’s not just about having to scrap work you’ve already done, which is totally understandable).
s

stocky-spoon-28903

01/04/2020, 6:16 PM
Personally I’ve found it easier to use whatever provisioning system I’m using for functions etc too, even if they’re developed with serverless or similar.
b

bright-orange-69401

01/06/2020, 12:24 AM
@miniature-musician-31262 I used Serverless to package my code & dependencies, then I use Pulumi's
sourceCodeHash
to detect changes and update Lambda accordingly One might argue that I could just
zip -r9
and package files myself, but I find that Serverless packaging utilities have nice glob pattern include/exclude mechanisms