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

great-plastic-10981

02/02/2024, 7:31 PM
what’s the recommended way to add pulumi to an existing project? e.g., i have a react app and i want to add pulumi to source control to provision an s3 bucket and cloufront distribution. should i create an
./infra/
folder and
npm i
pulumi’s deps in there? or should i mix pulumi’s deps with my own project’s
package.json
as dev dependencies?
m

millions-furniture-75402

02/02/2024, 8:03 PM
You have the flexibility to do either, or a 3rd option, to share the
package.json
but also put [most of] the pulumi stuff in a subdir. It really depends on your use case. For simplicity, the majority of our stacks have chosen to streamline it and use option 3, sharing the
package.json
using
devDependencies
which is usually just 2-3 pulumi packages. The Pulumi files go into
deploy
so any IaC solution can be expected in a sub dir there.
Pulumi.yaml
then looks something like:
Copy code
name: some-service
description: Some service
main: deploy/pulumi
stackConfigDir: deploy/pulumi
runtime:
  name: python
  options:
    virtualenv: venv
g

great-plastic-10981

02/02/2024, 8:30 PM
cool, makes sense. thanks for the reply!