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

colossal-tent-75408

12/09/2019, 11:39 PM
Hey all. I'm trying to work out the best way to carry out a particular use case. I would like to have a single AWS ALB, and then deploy each project independently. Core Infra • create ALB *create listeners for http and https * per project / services • add a certificate to https listener per service • create target groups per service • create listener rules per service • create Fargate services Any guidance would be much appreciated
r

rhythmic-hair-33677

12/10/2019, 12:02 AM
You would essentially export the object in your infra stack, and then use a StackReference inside your other projects.
c

colossal-tent-75408

12/10/2019, 12:46 AM
can that be used with awsx?
I'm guessing not
b

broad-dog-22463

12/10/2019, 12:46 AM
Yes StackReference is a Pulumi with thing
It’s built into the core
You can even (theoretically) export resources created in python for use in other applications written in a different language
c

colossal-tent-75408

12/10/2019, 12:48 AM
I've done
aws.alb.LoadBalancer.get
using the
arn
, but you can't mix it with awsx
b

broad-dog-22463

12/10/2019, 12:49 AM
Mmmhhh
Can you open an issue in Pulumi-aws with a recreation of this and I can take a look?
c

colossal-tent-75408

12/10/2019, 1:08 AM
thanks 🙌
I must admit, this is my first time experimenting with pulumi partypus
s

strong-lock-6425

02/06/2020, 11:41 PM
Hello, I've got exactly same concept now, did you found a good way of doing it @colossal-tent-75408 ?
c

colossal-tent-75408

04/17/2020, 9:42 PM
Unfortunately not, I've found a way to simplify the process and keep the costs down, although it is still not ideal. The ALB is still very much a manual process, but I've moved to EKS to help simplify deployments. The "core infra" manages the EKS cluster and exports the
kubeconfig
, then each app is able to deploy to it using a
StackReference
. In order to work with the ALB, I expose each app via a specific port. It's messy for now, but I'm looking at configuring a service like Traefik to manage routing within kubernetes