Does StackReference only work with the Pulumi Clou...
# general
Does StackReference only work with the Pulumi Cloud Platform? I'm currently using Pulumi with the file based state backup, but unless I'm missing something, I can not seem to get it to work, I've read through the documentation as well, and looked for samples, but there isn't much to find. So here's my scenario, I have a project, broken down by infra and app, the infra sets up ECS and references the ECR repository url of the app that's built and pushed. So there's a stack in app and one in infra. It would look like this:
Copy code
One of the outputs from the app project is the repository url as
. I would like to access this from the infra project. This is what I tried
, but I realise this is not the way to do it. How would I go about doing this using the local state implementation?
Maybe the section on Outputs will be helpful here
I think my question is more, how would I go about referencing the dev stack in the app project from the dev stack in the infra project using
so I can access one of it's outputs, whilst doing this using the local file based state management
cc @microscopic-florist-22719 who I think would know.
👍 1
You should be able to use the stack name just as you would with a cloud-backed stack.
I have figured out a workaround. The problem is, the local login defaults to ~ So anywhere a project is defined, there will be a local state folder for that. The workaround was to login locally using a folder that could be referenced by all projects. In other words, all projects state will exist there, like at the root of a drive for example
. That way I was able to use
with the stack name as suggested.