interesting setup that you describe there.
We run a multi-tenant platform using pulumi, with multiple stages per tenant, and multiple levels which are an abstraction layer for permission boundaries/organizational layers.
we use a cascade of repositories for the rollout, to rollout changes/updates in layers/stages.
This allows us to have one layer where each tenant == one branch, but then onwards, each tenant has an own "tree" of repos for the tenant specific stacks.
We use the automation API for orchestration, so cannot compare to the cloud deployments API.
A few gotchas:
⢠stack size: keep it small, so that rollouts are fast, and blast radius is in control. Also resource consumption can skyrocket if your stack becomes too large
⢠use stack references where possible to pass data/config/information
⢠use staged/delayed rollouts, to avoid hitting cloud provider API limits
⢠pulumi config has a size limit (at least we did hit it in using typescript/pulumi), so we either have to split into smaller stacks or offload some config into a separate system/file.
⢠also: you might want to consider having platform specific config and then also might need to enrich it with per-tenant-specific config. Think about how you could split this, so that you can update the platform config, without touching the customer specific inputs, and vice-versa