02/26/2020, 9:36 PM
Is there a doc on organizing your pulumi code? I am playing with the Auth0 sample and the API gateway sample (typescript) and am unsure if I should merge them into one big index.js or if there is a modular approach to applying them to the same stack.
👍 1


02/26/2020, 9:51 PM
hi Mary. Some of the decision is up to how you want to manage your infrastructure. I can give you our layout which is specific to a services platform using EKS.
We have pulumi programs for the following: 1. aws-iam 2. aws-infra (includes the EKS cluster) 3. aws-k8s - (things installed into the K8s cluster) 4. aws-monitoring - installs a Prometheus operator instance into K8s 5. aws-dns - builds Route53 resolvers and zones 6. cloudflare - edge config/firewall/caching etc
each of those programs has a corresponding environment stack - alpha, dev, staging, prod
Depending on your timeframe and comfort level I would strongly suggest reading about and trying the Pulumi component resource model. Creates interfaces and classes and type your objects. It makes testing easier, makes the index code more readable and gives you a good foundation for turning your Pulumi programs into libraries that can be consumed by 'n' number of teams
👍 1


02/26/2020, 9:59 PM


02/26/2020, 11:14 PM
Very helpful, thank you both
👍 1


02/27/2020, 12:26 AM
I have to add that “Organizing projects and Stacks” page is kinda hard to read. Need better tech writer.