Pulumi separates things like this through configuration, rather than via different codebases or scripts. Then it uses stacks to reprsent a particular deployment with a particular config. That is, your config would control whether app1, app2, both or neither were built & deployed for a particular stack. If you want to add/remove apps to a stack, you change the config and re-run the deployment (for the same stack).