Hey Guys, My team is currently buidling client-dr...
# general
b
Hey Guys, My team is currently buidling client-driven dynamic infrastructure using the Pulumi Automation API. For example, when a tenant enables SMTP, a short-lived task provisions the required queues. We have the general design in place, but we’d appreciate some guidance on how to structure the Pulumi stacks. We’re considering: • One stack per tenant • One stack per resource family .e.g. separate SMTP or SFTP stacks • One shared
dynamic-infra
stack I'm aware that we can use
target
and
targetDependents
to make deployment's well-scoped regardless of which ownership boundary we decide on but wondering if there are any gotcha's to look out for. Would be great to discuss the pros and cons of each approach.
a
We define stacks based on life cycles. Some resources are permanent and referenced, then they are in one stack. Others are disposable, deleted when idle, they are in separate stacks.
☝️ 1
➕ 1
l
Lifecycles 100%. Probably also by tenant, multiple projects, one stack of each per tenant.
Sometimes dependencies become easier by splitting across projects. For example, you may have a VPC/firewall project, with a stack per tenant, that most other projects depend on (lifecycle). You may also want a project for VPC peering, even though that's on the same lifecycle as the VPC/firewall project, because sorting peering in the same project as the peered VPC is horrendous.
👋 1