This message was deleted.
# general
s
This message was deleted.
l
You have an existing
index.ts
but you still need to bootstrap the project? Why is that?
c
Well I have a “template” project that it is being bootstrapped for each GCP project/customer so common items like admin gcp project, host VPC, etc are automatically created at the beginning. Hope it makes sense?
l
Yes, but you should keep the Pulumi project file (
Pulumi.yaml
) also under source control and only create a new stack non-interactively when you want to roll this out.
That is one way to do it. Another is to have the reusable code in a language specific package (npm for javascript, egg for python, …) and re-use this in a project which is specifically set up per customer
b
what you can do it to have generic__main__.py for python or index ts in your case and cp it to index.ts, that's what I do in pulumi_init script
c
Yes I was thinking about
cp
after bootstrapping is done. Is there a way to create a custom template? Perhaps this will be more elegant solution?
b
You can pass a url to
pulumi new
. The examples are here: https://github.com/pulumi/templates eg:
pulumi new <https://github.com/pulumi/templates/tree/master/kubernetes-python>
just replace the built in template with your own
c
Nice - Thanks👍