Hi there, Im trying to setup an EKS bootstrap for ...
# getting-started
f
Hi there, Im trying to setup an EKS bootstrap for a customer to convince them to use Pulumi (instead of current Terraform) and I followed the workshops, the start goed fine and U have a question; Is it possible to use stack references without pulumi cloud and if so, how to do this? We need this to make separation between microservice stacks and the infrastructure stack (eg referring vpcId and other outputs). Thanks in advance!
m
You can use stack references with a self-hosted backend as well. The only "gotcha" is that the organization's name will always be
organization
, everything else works as usual, e.g., in Python:
Copy code
stack_name = "other-stack"
project_name = pulumi.get_project()
org = pulumi.get_organization()

other_stack = pulumi.StackReference(f"{org}/{project_name}/{stack_name}")
f
Ok thanks! Will try this:) sounds logical
m
And you can only reference stacks in the same backend, i.e., all your state files have to be stored in the same place.